Partial revert of warning cleanup

These warnings are false-positives
This commit is contained in:
2015-09-04 14:24:22 +10:00
parent ef629e0d50
commit 3e63c604e3
12 changed files with 26 additions and 23 deletions

View File

@@ -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];

View File

@@ -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);

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;

View File

@@ -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);

View File

@@ -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;

View File

@@ -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) {

View File

@@ -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;

View File

@@ -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--) {

View File

@@ -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) {

View File

@@ -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, *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 = 0.0f, uv_v_offset_b = 0.0f;
float uv_v_offset_a, uv_v_offset_b;
const unsigned int mloop_index_orig[2] = {
vert_loop_map ? vert_loop_map[medge_new[i].v1] : UINT_MAX,