diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-09-04 07:24:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-09-04 07:40:03 +0300 |
commit | 3e63c604e395f00d2ee81fa48ab1bad29c95a4e7 (patch) | |
tree | d54f49fe39e668e38505b83107aa6f7d5de76e3f /source/blender/editors | |
parent | ef629e0d504ea6b53cf490f0f084d5a0b587bf6b (diff) |
Partial revert of warning cleanup
These warnings are false-positives
Diffstat (limited to 'source/blender/editors')
7 files changed, 14 insertions, 11 deletions
diff --git a/source/blender/editors/curve/editcurve_select.c b/source/blender/editors/curve/editcurve_select.c index 885e8c6c15f..0f3942b0c90 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 = 0; + int i, vert_curr; int totu = nu->pntsu; int totv = nu->pntsv; diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 96972f91552..d521b2c01e5 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] = NULL; + float (*tf_uv)[2]; 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 = NULL; + bool *winding; 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] = NULL; + float (*tf_uv)[2]; if (use_winding) { tf_uv = (float (*)[2])BLI_buffer_resize_data(&tf_uv_buf, vec2f, efa->len); diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c index 3113f031277..c5a066e9b14 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 = 0.0f; + float f; float p[2] = {x_px - image_init[0], y_px - image_init[1]}; switch (br->gradient_fill_mode) { @@ -1601,6 +1601,7 @@ void paint_2d_gradient_fill( break; } case BRUSH_GRADIENT_RADIAL: + default: { f = len_v2(p) / line_len; break; @@ -1619,7 +1620,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 = 0.0f; + float f; float p[2] = {x_px - image_init[0], y_px - image_init[1]}; switch (br->gradient_fill_mode) { @@ -1629,6 +1630,7 @@ void paint_2d_gradient_fill( break; } case BRUSH_GRADIENT_RADIAL: + default: { f = len_v2(p) / line_len; break; diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 90cb7c0c079..cf13c9c1d83 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -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 = 0.0f; + float f; float color_f[4]; float p[2] = {projPixel->projCoSS[0] - lastpos[0], projPixel->projCoSS[1] - lastpos[1]}; @@ -4474,6 +4474,7 @@ static void *do_projectpaint_thread(void *ph_v) break; } case BRUSH_GRADIENT_RADIAL: + default: { f = len_v2(p) / line_len; break; @@ -4586,7 +4587,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] = {0.0f, 0.0f, 0.0f}; + float texrgb[3]; 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 bb11fa06e4f..2a1b324be02 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 = 0; + unsigned int index, totindex; 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 8ca74fac727..462b619f497 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 = 0, amount = 0; + int columns, size, n, w = 0, padding, 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 f8f5a2cd6c2..3a8fa2a6ca7 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 = NULL; + BoneInitData *bid; t->total = 0; for (ebo = edbo->first; ebo; ebo = ebo->next) { |