diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2015-09-04 02:04:37 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2015-09-04 02:04:37 +0300 |
commit | ef629e0d504ea6b53cf490f0f084d5a0b587bf6b (patch) | |
tree | fbd9a87c2164176762811fdc9375b01bbca3ff41 | |
parent | c3fef001ee926fc183255b623f56da9fc5fcbb73 (diff) |
Quiet warnings
We had too many warnings lately... was awaiting that someone would kill them - didn't happen -> goes to my commit ratio! :P
30 files changed, 53 insertions, 49 deletions
diff --git a/intern/ghost/intern/GHOST_ContextGLX.cpp b/intern/ghost/intern/GHOST_ContextGLX.cpp index 3cce2236143..6d26666a748 100644 --- a/intern/ghost/intern/GHOST_ContextGLX.cpp +++ b/intern/ghost/intern/GHOST_ContextGLX.cpp @@ -404,5 +404,7 @@ int GHOST_X11_GL_GetAttributes( GHOST_ASSERT(i <= attribs_max, "attribute size too small"); + (void)attribs_max; + return i; } diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index aa9e9567ecf..8d7d62be7e4 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -2626,7 +2626,7 @@ void BKE_curve_bevelList_make(Object *ob, ListBase *nurbs, bool for_render) BevPoint *bevp, *bevp2, *bevp1 = NULL, *bevp0; const float treshold = 0.00001f; float min, inp; - float *seglen; + float *seglen = NULL; struct BevelSort *sortdata, *sd, *sd1; int a, b, nr, poly, resolu = 0, len = 0, segcount; int *segbevcount; diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index 3213b59b92d..c83050627e9 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -1600,7 +1600,7 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba float bottom_no[3] = {0.0f}; float top_no[3] = {0.0f}; float firstblend = 0.0f, lastblend = 0.0f; - int i, start, steps; + int i, start, steps = 0; if (nu->flagu & CU_NURB_CYCLIC) { calc_bevfac_mapping_default(bl, diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 7f1d2e877ed..7557015be8e 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -2085,7 +2085,7 @@ static int dynamicPaint_findNeighbourPixel(PaintUVPoint *tempPoints, DerivedMesh int i, edge1_index, edge2_index, e1_index, e2_index, target_tri; float closest_point[2], lambda, dir_vec[2]; - int target_uv1, target_uv2, final_pixel[2], final_index; + int target_uv1 = 0, target_uv2 = 0, final_pixel[2], final_index; const float *s_uv1, *s_uv2, *t_uv1, *t_uv2; @@ -3416,7 +3416,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface, { float proxDist = -1.0f; float hitCo[3] = {0.0f, 0.0f, 0.0f}; - int tri; + int tri = 0; /* if inverse prox and no hit found, skip this sample */ if (inner_proximity && !hit_found) continue; diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c index f463cab1a10..840935c090b 100644 --- a/source/blender/blenkernel/intern/editderivedmesh.c +++ b/source/blender/blenkernel/intern/editderivedmesh.c @@ -397,7 +397,7 @@ static void emDM_calcLoopTangents(DerivedMesh *dm) mesh2tangent.precomputedLoopNormals = tlnors; mesh2tangent.looptris = em->looptris; mesh2tangent.cd_loop_uv_offset = cd_loop_uv_offset; - mesh2tangent.orco = orco; + mesh2tangent.orco = (const float (*)[3])orco; mesh2tangent.tangent = tangent; mesh2tangent.numTessFaces = totface; diff --git a/source/blender/blenkernel/intern/mesh_mapping.c b/source/blender/blenkernel/intern/mesh_mapping.c index ef9136397fa..cf4c49a9244 100644 --- a/source/blender/blenkernel/intern/mesh_mapping.c +++ b/source/blender/blenkernel/intern/mesh_mapping.c @@ -65,7 +65,7 @@ UvVertMap *BKE_mesh_uv_vert_map_create( unsigned int a; int i, totuv, nverts; - bool *winding; + bool *winding = NULL; BLI_buffer_declare_static(vec2f, tf_uv_buf, BLI_BUFFER_NOP, 32); totuv = 0; @@ -94,7 +94,7 @@ UvVertMap *BKE_mesh_uv_vert_map_create( mp = mpoly; for (a = 0; a < totpoly; a++, mp++) { if (!selected || (!(mp->flag & ME_HIDE) && (mp->flag & ME_FACE_SEL))) { - float (*tf_uv)[2]; + float (*tf_uv)[2] = NULL; if (use_winding) { tf_uv = (float (*)[2])BLI_buffer_resize_data(&tf_uv_buf, vec2f, mp->totloop); diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 2e462816850..5192a51934a 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -2383,9 +2383,9 @@ static void ccgDM_buffer_copy_edge( /* part one, handle all normal edges */ for (j = 0; j < totedge; j++) { CCGFace *f; - int fhandle; - int totvert; - unsigned int S; + int fhandle = 0; + int totvert = 0; + unsigned int S = 0; CCGEdge *e = ccgdm->edgeMap[j].edge; bool isloose = !ccgSubSurf_getEdgeNumFaces(e); diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index bc952165b61..ef9a7c0603f 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -570,7 +570,7 @@ static int recursive_operation(const char *startfrom, const char *startto, char *from_path = NULL, *to_path = NULL; struct dirent **dirlist = NULL; size_t from_alloc_len = -1, to_alloc_len = -1; - int i, n, ret = 0; + int i, n = 0, ret = 0; do { /* once */ /* ensure there's no trailing slash in file path */ diff --git a/source/blender/bmesh/operators/bmo_fill_grid.c b/source/blender/bmesh/operators/bmo_fill_grid.c index fd1e91a0b30..02318740061 100644 --- a/source/blender/bmesh/operators/bmo_fill_grid.c +++ b/source/blender/bmesh/operators/bmo_fill_grid.c @@ -228,7 +228,7 @@ static void bm_grid_fill_array( unsigned int x, y; /* for use_loop_interp */ - BMLoop *((*larr_x_a)[2]), *((*larr_x_b)[2]), *((*larr_y_a)[2]), *((*larr_y_b)[2]); + BMLoop *((*larr_x_a)[2]) = NULL, *((*larr_x_b)[2]) = NULL, *((*larr_y_a)[2]) = NULL, *((*larr_y_b)[2]) = NULL; float (*weight_table)[4]; diff --git a/source/blender/bmesh/operators/bmo_inset.c b/source/blender/bmesh/operators/bmo_inset.c index 118a19d3082..bb746a63c87 100644 --- a/source/blender/bmesh/operators/bmo_inset.c +++ b/source/blender/bmesh/operators/bmo_inset.c @@ -276,7 +276,7 @@ static void bmo_face_inset_individual( BMLoop *l_iter, *l_first; BMLoop *l_other; unsigned int i; - float e_length_prev; + float e_length_prev = 0.0f; l_first = BM_FACE_FIRST_LOOP(f); diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c index 45e3c8d193d..72dd7c25944 100644 --- a/source/blender/bmesh/operators/bmo_subdivide.c +++ b/source/blender/bmesh/operators/bmo_subdivide.c @@ -787,7 +787,7 @@ void bmo_subdivide_edges_exec(BMesh *bm, BMOperator *op) BLI_array_declare(verts); float smooth, fractal, along_normal; bool use_sphere, use_single_edge, use_grid_fill, use_only_quads; - int cornertype, seed, i, j, a, b, numcuts, totesel, smooth_falloff; + int cornertype, seed, i, j, a, b = 0, numcuts, totesel, smooth_falloff; BMO_slot_buffer_flag_enable(bm, op->slots_in, "edges", BM_EDGE, SUBD_SPLIT); diff --git a/source/blender/bmesh/operators/bmo_utils.c b/source/blender/bmesh/operators/bmo_utils.c index 964d0b1dfc6..60bb22f7614 100644 --- a/source/blender/bmesh/operators/bmo_utils.c +++ b/source/blender/bmesh/operators/bmo_utils.c @@ -491,8 +491,8 @@ void bmo_rotate_uvs_exec(BMesh *bm, BMOperator *op) BMO_ITER (fs, &fs_iter, op->slots_in, "faces", BM_FACE) { if (use_ccw == false) { /* same loops direction */ BMLoop *lf; /* current face loops */ - MLoopUV *f_luv; /* first face loop uv */ - float p_uv[2]; /* previous uvs */ + MLoopUV *f_luv = NULL; /* first face loop uv */ + float p_uv[2] = {0.0f, 0.0f}; /* previous uvs */ float t_uv[2]; /* tmp uvs */ int n = 0; @@ -516,8 +516,8 @@ void bmo_rotate_uvs_exec(BMesh *bm, BMOperator *op) else { /* counter loop direction */ BMLoop *lf; /* current face loops */ MLoopUV *p_luv; /* previous loop uv */ - MLoopUV *luv; - float t_uv[2]; /* current uvs */ + MLoopUV *luv = NULL; + float t_uv[2] = {0.0f, 0.0f}; /* current uvs */ int n = 0; BM_ITER_ELEM (lf, &l_iter, fs, BM_LOOPS_OF_FACE) { @@ -594,7 +594,7 @@ void bmo_rotate_colors_exec(BMesh *bm, BMOperator *op) BMO_ITER (fs, &fs_iter, op->slots_in, "faces", BM_FACE) { if (use_ccw == false) { /* same loops direction */ BMLoop *lf; /* current face loops */ - MLoopCol *f_lcol; /* first face loop color */ + MLoopCol *f_lcol = NULL; /* first face loop color */ MLoopCol p_col; /* previous color */ MLoopCol t_col; /* tmp color */ @@ -619,7 +619,7 @@ void bmo_rotate_colors_exec(BMesh *bm, BMOperator *op) else { /* counter loop direction */ BMLoop *lf; /* current face loops */ MLoopCol *p_lcol; /* previous loop color */ - MLoopCol *lcol; + MLoopCol *lcol = NULL; MLoopCol t_col; /* current color */ int n = 0; diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index c7f77a7604f..9fba5b147bf 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -4032,7 +4032,7 @@ static float find_superellipse_chord_u(float u0, float d2goal, float r) * Return the u's in *r_params, which should point to an array of size n+1. */ static void find_even_superellipse_params(int n, float r, float *r_params) { - float d2low, d2high, d2, d2final, u; + float d2low, d2high, d2 = 0.0f, d2final, u; int i, j, n2; const int maxiters = 40; const float d2tol = 1e-6f; diff --git a/source/blender/bmesh/tools/bmesh_intersect.c b/source/blender/bmesh/tools/bmesh_intersect.c index 169ad49195c..19cf2d29aff 100644 --- a/source/blender/bmesh/tools/bmesh_intersect.c +++ b/source/blender/bmesh/tools/bmesh_intersect.c @@ -1000,7 +1000,7 @@ bool BM_mesh_intersect( if (BM_vert_in_edge(e, v_prev)) { v_prev = BM_edge_split(bm, e, v_prev, NULL, CLAMPIS(fac, 0.0f, 1.0f)); - BLI_assert( BM_vert_in_edge(e, v_end)); + BLI_assert(BM_vert_in_edge(e, v_end)); if (!BM_edge_exists(v_prev, vi) && !BM_vert_splice_check_double(v_prev, vi) && @@ -1017,6 +1017,7 @@ bool BM_mesh_intersect( } } } + UNUSED_VARS_NDEBUG(v_end); } } #endif diff --git a/source/blender/editors/curve/editcurve_select.c b/source/blender/editors/curve/editcurve_select.c index cbb533a0440..885e8c6c15f 100644 --- a/source/blender/editors/curve/editcurve_select.c +++ b/source/blender/editors/curve/editcurve_select.c @@ -1579,7 +1579,7 @@ static void curve_select_shortest_path_surf(Nurb *nu, int vert_src, int vert_dst { Heap *heap; - int i, vert_curr; + int i, vert_curr = 0; int totu = nu->pntsu; int totv = nu->pntsv; @@ -1725,4 +1725,4 @@ void CURVE_OT_shortest_path_pick(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -/** \} */
\ No newline at end of file +/** \} */ diff --git a/source/blender/editors/mask/mask_add.c b/source/blender/editors/mask/mask_add.c index 2dae9561d4e..822bb429f9e 100644 --- a/source/blender/editors/mask/mask_add.c +++ b/source/blender/editors/mask/mask_add.c @@ -74,7 +74,7 @@ bool ED_mask_find_nearest_diff_point(const bContext *C, MaskSplinePoint *point = NULL; float dist_best_sq = FLT_MAX, co[2]; int width, height; - float u; + float u = 0.0f; float scalex, scaley; ED_mask_get_size(sa, &width, &height); diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c index 929c4f74b2f..bf8630ff843 100644 --- a/source/blender/editors/mask/mask_ops.c +++ b/source/blender/editors/mask/mask_ops.c @@ -516,7 +516,7 @@ static bool spline_under_mouse_get(const bContext *C, MaskLayer *mask_layer; int width, height; float pixel_co[2]; - float closest_dist_squared; + float closest_dist_squared = 0.0f; MaskLayer *closest_layer = NULL; MaskSpline *closest_spline = NULL; bool undistort = false; @@ -2209,7 +2209,7 @@ static int mask_duplicate_exec(bContext *C, wmOperator *UNUSED(op)) } if (end >= start) { int tot_point; - int tot_point_shape_start; + int tot_point_shape_start = 0; MaskSpline *new_spline = BKE_mask_spline_add(mask_layer); MaskSplinePoint *new_point; int b; diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index d521b2c01e5..96972f91552 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -668,7 +668,7 @@ UvVertMap *BM_uv_vert_map_create( BM_ITER_MESH_INDEX (efa, &iter, bm, BM_FACES_OF_MESH, a) { if ((use_select == false) || BM_elem_flag_test(efa, BM_ELEM_SELECT)) { - float (*tf_uv)[2]; + float (*tf_uv)[2] = NULL; if (use_winding) { tf_uv = (float (*)[2])BLI_buffer_resize_data(&tf_uv_buf, vec2f, efa->len); @@ -779,7 +779,7 @@ UvElementMap *BM_uv_element_map_create( /* vars from original func */ UvElementMap *element_map; UvElement *buf; - bool *winding; + bool *winding = NULL; BLI_buffer_declare_static(vec2f, tf_uv_buf, BLI_BUFFER_NOP, BM_DEFAULT_NGON_STACK_SIZE); MLoopUV *luv; @@ -820,7 +820,7 @@ UvElementMap *BM_uv_element_map_create( } if (!selected || BM_elem_flag_test(efa, BM_ELEM_SELECT)) { - float (*tf_uv)[2]; + float (*tf_uv)[2] = NULL; if (use_winding) { tf_uv = (float (*)[2])BLI_buffer_resize_data(&tf_uv_buf, vec2f, efa->len); diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c index b382fbafcfd..2c4f7a8e107 100644 --- a/source/blender/editors/object/object_bake_api.c +++ b/source/blender/editors/object/object_bake_api.c @@ -563,7 +563,7 @@ static int bake( Object *ob_cage = NULL; BakeHighPolyData *highpoly = NULL; - int tot_highpoly; + int tot_highpoly = 0; char restrict_flag_low = ob_low->restrictflag; char restrict_flag_cage = 0; diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c index 03a96fb149a..3113f031277 100644 --- a/source/blender/editors/sculpt_paint/paint_image_2d.c +++ b/source/blender/editors/sculpt_paint/paint_image_2d.c @@ -1591,7 +1591,7 @@ void paint_2d_gradient_fill( if (do_float) { for (x_px = 0; x_px < ibuf->x; x_px++) { for (y_px = 0; y_px < ibuf->y; y_px++) { - float f; + float f = 0.0f; float p[2] = {x_px - image_init[0], y_px - image_init[1]}; switch (br->gradient_fill_mode) { @@ -1619,7 +1619,7 @@ void paint_2d_gradient_fill( else { for (x_px = 0; x_px < ibuf->x; x_px++) { for (y_px = 0; y_px < ibuf->y; y_px++) { - float f; + float f = 0.0f; float p[2] = {x_px - image_init[0], y_px - image_init[1]}; switch (br->gradient_fill_mode) { diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 2a1ae891e29..90cb7c0c079 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -2695,7 +2695,7 @@ static void project_paint_face_init( interp_v3_v3v3(edge_verts_inset_clip[1], insetCos[fidx1], insetCos[fidx2], fac2); - if (pixel_bounds_uv(seam_subsection, &bounds_px, ibuf->x, ibuf->y)) { + if (pixel_bounds_uv((const float (*)[2])seam_subsection, &bounds_px, ibuf->x, ibuf->y)) { /* bounds between the seam rect and the uvspace bucket pixels */ has_isect = 0; @@ -4458,7 +4458,7 @@ static void *do_projectpaint_thread(void *ph_v) /* these could probably be cached instead of being done per pixel */ float tangent[2]; float line_len_sq_inv, line_len; - float f; + float f = 0.0f; float color_f[4]; float p[2] = {projPixel->projCoSS[0] - lastpos[0], projPixel->projCoSS[1] - lastpos[1]}; @@ -4586,7 +4586,7 @@ static void *do_projectpaint_thread(void *ph_v) falloff = BKE_brush_curve_strength_clamped(ps->brush, dist, brush_radius); if (falloff > 0.0f) { - float texrgb[3]; + float texrgb[3] = {0.0f, 0.0f, 0.0f}; float mask; if (ps->do_masking) { diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 2a1b324be02..bb11fa06e4f 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -2156,7 +2156,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P float paintweight; int *indexar; float totw; - unsigned int index, totindex; + unsigned int index, totindex = 0; float alpha; float mval[2]; bool use_vert_sel; diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 462b619f497..8ca74fac727 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -453,7 +453,7 @@ static void text_draw(SpaceText *st, char *str, int cshift, int maxwidth, int x, { const bool use_syntax = (st->showsyntax && format); FlattenString fs; - int columns, size, n, w = 0, padding, amount = 0; + int columns, size, n, w = 0, padding = 0, amount = 0; const char *in = NULL; for (n = flatten_string(st, &fs, str), str = fs.buf; n > 0; n--) { diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 3a8fa2a6ca7..f8f5a2cd6c2 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -1119,7 +1119,7 @@ static void createTransArmatureVerts(TransInfo *t) bool mirror = ((arm->flag & ARM_MIRROR_EDIT) != 0); int total_mirrored = 0, i; int oldtot; - BoneInitData *bid; + BoneInitData *bid = NULL; t->total = 0; for (ebo = edbo->first; ebo; ebo = ebo->next) { diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 21bc25f54d1..2eacb6c7c2e 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -2163,8 +2163,8 @@ static bool peelDerivedMesh( if (data.bvhdata.tree != NULL) { data.ob = ob; - data.obmat = obmat; - data.timat = timat; + data.obmat = (const float (*)[4])obmat; + data.timat = (const float (*)[3])timat; data.ray_start = ray_start; data.looptri = looptri; data.polynors = dm->getPolyDataArray(dm, CD_NORMAL); /* can be NULL */ diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index 12292f4897c..903d65599d9 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -718,7 +718,7 @@ static char *code_generate_vertex(ListBase *nodes, const GPUMatType type) GPUNode *node; GPUInput *input; char *code; - char *vertcode; + char *vertcode = NULL; for (node = nodes->first; node; node = node->next) { for (input = node->inputs.first; input; input = input->next) { diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c index 7523c7c7525..b20d7d8a3a9 100644 --- a/source/blender/modifiers/intern/MOD_displace.c +++ b/source/blender/modifiers/intern/MOD_displace.c @@ -235,7 +235,8 @@ static void displaceModifier_do( clnors = CustomData_get_layer(ldata, CD_NORMAL); vert_clnors = MEM_mallocN(sizeof(*vert_clnors) * (size_t)numVerts, __func__); - BKE_mesh_normals_loop_to_vertex(numVerts, dm->getLoopArray(dm), dm->getNumLoops(dm), clnors, vert_clnors); + BKE_mesh_normals_loop_to_vertex(numVerts, dm->getLoopArray(dm), dm->getNumLoops(dm), + (const float (*)[3])clnors, vert_clnors); } else { direction = MOD_DISP_DIR_NOR; diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c index db65f4431e4..33a8520fc51 100644 --- a/source/blender/modifiers/intern/MOD_screw.c +++ b/source/blender/modifiers/intern/MOD_screw.c @@ -176,7 +176,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, MLoopUV **mloopuv_layers = BLI_array_alloca(mloopuv_layers, mloopuv_layers_tot); float uv_u_scale; float uv_v_minmax[2] = {FLT_MAX, -FLT_MAX}; - float uv_v_range_inv; + float uv_v_range_inv = 0.0f; float uv_axis_plane[4]; char axis_char = 'X'; @@ -196,7 +196,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, unsigned int edge_offset; - MPoly *mpoly_orig, *mpoly_new, *mp_new; + MPoly *mpoly_orig = NULL, *mpoly_new, *mp_new; MLoop *mloop_orig, *mloop_new, *ml_new; MEdge *medge_orig, *med_orig, *med_new, *med_new_firstloop, *medge_new; MVert *mvert_new, *mvert_orig, *mv_orig, *mv_new, *mv_new_base; @@ -877,7 +877,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, const unsigned int step_last = step_tot - (close ? 1 : 2); const unsigned int mpoly_index_orig = totpoly ? edge_poly_map[i] : UINT_MAX; const bool has_mpoly_orig = (mpoly_index_orig != UINT_MAX); - float uv_v_offset_a, uv_v_offset_b; + float uv_v_offset_a = 0.0f, uv_v_offset_b = 0.0f; const unsigned int mloop_index_orig[2] = { vert_loop_map ? vert_loop_map[medge_new[i].v1] : UINT_MAX, diff --git a/source/blender/python/mathutils/mathutils_bvhtree.c b/source/blender/python/mathutils/mathutils_bvhtree.c index 8a488fdfd08..bf06b889e25 100644 --- a/source/blender/python/mathutils/mathutils_bvhtree.c +++ b/source/blender/python/mathutils/mathutils_bvhtree.c @@ -277,7 +277,7 @@ static void py_bvhtree_raycast_cb(void *userdata, int index, const BVHTreeRay *r { const PyBVHTree *self = userdata; - const float (*coords)[3] = self->coords; + const float (*coords)[3] = (const float (*)[3])self->coords; const unsigned int *tri = self->tris[index]; const float *tri_co[3] = {coords[tri[0]], coords[tri[1]], coords[tri[2]]}; float dist; @@ -306,7 +306,7 @@ static void py_bvhtree_nearest_point_cb(void *userdata, int index, const float c { PyBVHTree *self = userdata; - const float (*coords)[3] = self->coords; + const float (*coords)[3] = (const float (*)[3])self->coords; const unsigned int *tri = self->tris[index]; const float *tri_co[3] = {coords[tri[0]], coords[tri[1]], coords[tri[2]]}; float nearest_tmp[3], dist_sq; diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 9c5e7fc069a..c9dd07208c1 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -4448,7 +4448,7 @@ static void radial_control_cancel(bContext *C, wmOperator *op) static int radial_control_modal(bContext *C, wmOperator *op, const wmEvent *event) { RadialControl *rc = op->customdata; - float new_value, dist, zoom[2]; + float new_value, dist = 0.0f, zoom[2]; float delta[2], ret = OPERATOR_RUNNING_MODAL; bool snap; float angle_precision = 0.0f; |