[Bf-blender-cvs] [3e63c60] master: Partial revert of warning cleanup
Campbell Barton
noreply at git.blender.org
Fri Sep 4 06:46:24 CEST 2015
Commit: 3e63c604e395f00d2ee81fa48ab1bad29c95a4e7
Author: Campbell Barton
Date: Fri Sep 4 14:24:22 2015 +1000
Branches: master
https://developer.blender.org/rB3e63c604e395f00d2ee81fa48ab1bad29c95a4e7
Partial revert of warning cleanup
These warnings are false-positives
===================================================================
M source/blender/bmesh/operators/bmo_fill_grid.c
M source/blender/bmesh/operators/bmo_inset.c
M source/blender/bmesh/operators/bmo_subdivide.c
M source/blender/bmesh/operators/bmo_utils.c
M source/blender/editors/curve/editcurve_select.c
M source/blender/editors/mesh/editmesh_utils.c
M source/blender/editors/sculpt_paint/paint_image_2d.c
M source/blender/editors/sculpt_paint/paint_image_proj.c
M source/blender/editors/sculpt_paint/paint_vertex.c
M source/blender/editors/space_text/text_draw.c
M source/blender/editors/transform/transform_conversions.c
M source/blender/modifiers/intern/MOD_screw.c
===================================================================
diff --git a/source/blender/bmesh/operators/bmo_fill_grid.c b/source/blender/bmesh/operators/bmo_fill_grid.c
index 0231874..fd1e91a 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]) = NULL, *((*larr_x_b)[2]) = NULL, *((*larr_y_a)[2]) = NULL, *((*larr_y_b)[2]) = NULL;
+ BMLoop *((*larr_x_a)[2]), *((*larr_x_b)[2]), *((*larr_y_a)[2]), *((*larr_y_b)[2]);
float (*weight_table)[4];
diff --git a/source/blender/bmesh/operators/bmo_inset.c b/source/blender/bmesh/operators/bmo_inset.c
index bb746a6..118a19d 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 = 0.0f;
+ float e_length_prev;
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 72dd7c2..45e3c8d 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 = 0, numcuts, totesel, smooth_falloff;
+ int cornertype, seed, i, j, a, b, 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 60bb22f..964d0b1 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 = NULL; /* first face loop uv */
- float p_uv[2] = {0.0f, 0.0f}; /* previous uvs */
+ MLoopUV *f_luv; /* first face loop uv */
+ float p_uv[2]; /* 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 = NULL;
- float t_uv[2] = {0.0f, 0.0f}; /* current uvs */
+ MLoopUV *luv;
+ float t_uv[2]; /* 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 = NULL; /* first face loop color */
+ MLoopCol *f_lcol; /* 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 = NULL;
+ MLoopCol *lcol;
MLoopCol t_col; /* current color */
int n = 0;
diff --git a/source/blender/editors/curve/editcurve_select.c b/source/blender/editors/curve/editcurve_select.c
index 885e8c6..0f3942b 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 96972f9..d521b2c 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 3113f03..c5a066e 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 90cb7c0..cf13c9c 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 bb11fa0..2a1b324 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 8ca74fa..462b619 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 f8f5a2c..3a8fa2a 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) {
diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c
index 33a8520..db65f44 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 = 0.0f;
+ float uv_v_range_inv;
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 = NULL, *mpoly_new, *mp_new;
+ MPoly *mpoly_orig, *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, *m
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list