Cleanup: quite some harmless but noisy warnings from gcc...

This commit is contained in:
2015-01-11 21:03:15 +01:00
parent 1b3b011354
commit 7a1dc20560
12 changed files with 18 additions and 16 deletions

View File

@@ -53,8 +53,7 @@ static const char *bc_get_joint_name(T *node)
static EditBone *get_edit_bone(bArmature * armature, char *name) { static EditBone *get_edit_bone(bArmature * armature, char *name) {
EditBone *eBone; EditBone *eBone;
eBone = (EditBone *)armature->edbo->first; for (eBone = (EditBone *)armature->edbo->first; eBone; eBone = eBone->next) {
for (eBone; eBone; eBone = eBone->next) {
if (!strcmp(name, eBone->name)) if (!strcmp(name, eBone->name))
return eBone; return eBone;
} }
@@ -259,7 +258,7 @@ void ArmatureImporter::connect_bone_chains(bArmature *armature, Bone *parentbone
Bone *child = (Bone *)parentbone->childbase.first; Bone *child = (Bone *)parentbone->childbase.first;
if (child && (import_settings->find_chains || child->next==NULL) ) if (child && (import_settings->find_chains || child->next==NULL) )
{ {
for (child; child; child = child->next) { for (; child; child = child->next) {
BoneExtended *be = extended_bones[child->name]; BoneExtended *be = extended_bones[child->name];
if (be != NULL) { if (be != NULL) {
if (be->get_chain_length() <= clip) { if (be->get_chain_length() <= clip) {

View File

@@ -904,7 +904,7 @@ void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname
if (prop && RNA_property_type(prop) == PROP_ENUM) { if (prop && RNA_property_type(prop) == PROP_ENUM) {
EnumPropertyItem *item, *item_array = NULL; EnumPropertyItem *item, *item_array = NULL;
bool free; bool free;
uiLayout *split; uiLayout *split = NULL;
uiLayout *target; uiLayout *target;
if (radial) { if (radial) {

View File

@@ -516,7 +516,7 @@ static bool spline_under_mouse_get(const bContext *C,
MaskLayer *mask_layer; MaskLayer *mask_layer;
int width, height; int width, height;
float pixel_co[2]; float pixel_co[2];
float closest_dist_squared; float closest_dist_squared = FLT_MAX;
MaskLayer *closest_layer = NULL; MaskLayer *closest_layer = NULL;
MaskSpline *closest_spline = NULL; MaskSpline *closest_spline = NULL;
bool undistort = false; bool undistort = false;
@@ -2209,7 +2209,7 @@ static int mask_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
} }
if (end >= start) { if (end >= start) {
int tot_point; int tot_point;
int tot_point_shape_start; int tot_point_shape_start = 0;
MaskSpline *new_spline = BKE_mask_spline_add(mask_layer); MaskSpline *new_spline = BKE_mask_spline_add(mask_layer);
MaskSplinePoint *new_point; MaskSplinePoint *new_point;
int b; int b;

View File

@@ -803,6 +803,7 @@ static void parent_set_vert_find(KDTree *tree, Object *child, int vert_par[3], b
tot = BLI_kdtree_find_nearest_n(tree, co_find, nearest, 3); tot = BLI_kdtree_find_nearest_n(tree, co_find, nearest, 3);
BLI_assert(tot == 3); BLI_assert(tot == 3);
UNUSED_VARS(tot);
vert_par[0] = nearest[0].index; vert_par[0] = nearest[0].index;
vert_par[1] = nearest[1].index; vert_par[1] = nearest[1].index;

View File

@@ -895,7 +895,7 @@ static void region_azone_tria(ScrArea *sa, AZone *az, ARegion *ar)
static void region_azone_initialize(ScrArea *sa, ARegion *ar, AZEdge edge, const bool is_fullscreen) static void region_azone_initialize(ScrArea *sa, ARegion *ar, AZEdge edge, const bool is_fullscreen)
{ {
AZone *az; AZone *az = NULL;
const bool is_hidden = (ar->flag & (RGN_FLAG_HIDDEN | RGN_FLAG_TOO_SMALL)) == 0; const bool is_hidden = (ar->flag & (RGN_FLAG_HIDDEN | RGN_FLAG_TOO_SMALL)) == 0;
if (is_hidden || !is_fullscreen) { if (is_hidden || !is_fullscreen) {
@@ -906,7 +906,7 @@ static void region_azone_initialize(ScrArea *sa, ARegion *ar, AZEdge edge, const
az->edge = edge; az->edge = edge;
} }
if (ar->flag & (RGN_FLAG_HIDDEN | RGN_FLAG_TOO_SMALL)) { if (!is_hidden) {
if (!is_fullscreen) { if (!is_fullscreen) {
if (G.debug_value == 3) if (G.debug_value == 3)
region_azone_icon(sa, az, ar); region_azone_icon(sa, az, ar);

View File

@@ -2272,7 +2272,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
float paintweight; float paintweight;
int *indexar; int *indexar;
float totw; float totw;
unsigned int index, totindex; unsigned int index, totindex = 0;
float alpha; float alpha;
float mval[2]; float mval[2];
bool use_vert_sel; bool use_vert_sel;

View File

@@ -350,7 +350,7 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, const wmEvent *e
} }
else if (left_right != SEQ_SELECT_LR_NONE) { else if (left_right != SEQ_SELECT_LR_NONE) {
/* use different logic for this */ /* use different logic for this */
float x; float x = 0.0f;
ED_sequencer_deselect_all(scene); ED_sequencer_deselect_all(scene);
switch (left_right) { switch (left_right) {

View File

@@ -5240,6 +5240,8 @@ static BMLoop *get_next_loop(BMVert *v, BMLoop *l,
float tvec[3]; float tvec[3];
float dist; float dist;
zero_v3(tvec);
if (bm_loop_calc_opposite_co(l_tmp, tdir, tvec)) { if (bm_loop_calc_opposite_co(l_tmp, tdir, tvec)) {
dist = len_v3v3(l_tmp->v->co, tvec); dist = len_v3v3(l_tmp->v->co, tvec);
} }

View File

@@ -1117,7 +1117,7 @@ static void createTransArmatureVerts(TransInfo *t)
bool mirror = ((arm->flag & ARM_MIRROR_EDIT) != 0); bool mirror = ((arm->flag & ARM_MIRROR_EDIT) != 0);
int total_mirrored = 0, i; int total_mirrored = 0, i;
int oldtot; int oldtot;
BoneInitData *bid; BoneInitData *bid = NULL;
t->total = 0; t->total = 0;
for (ebo = edbo->first; ebo; ebo = ebo->next) { for (ebo = edbo->first; ebo; ebo = ebo->next) {

View File

@@ -457,7 +457,7 @@ static void validate_solution(LaplacianSystem *sys, short flag, float lambda, fl
{ {
int i; int i;
float lam; float lam;
float vini, vend; float vini = 0.0f, vend;
if (flag & MOD_LAPLACIANSMOOTH_PRESERVE_VOLUME) { if (flag & MOD_LAPLACIANSMOOTH_PRESERVE_VOLUME) {
vini = compute_volume(sys->vertexCos, sys->mfaces, sys->numFaces); vini = compute_volume(sys->vertexCos, sys->mfaces, sys->numFaces);

View File

@@ -174,7 +174,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
MLoopUV **mloopuv_layers = BLI_array_alloca(mloopuv_layers, mloopuv_layers_tot); MLoopUV **mloopuv_layers = BLI_array_alloca(mloopuv_layers, mloopuv_layers_tot);
float uv_u_scale; float uv_u_scale;
float uv_v_minmax[2] = {FLT_MAX, -FLT_MAX}; 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]; float uv_axis_plane[4];
char axis_char = 'X'; char axis_char = 'X';
@@ -194,7 +194,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
unsigned int edge_offset; 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; MLoop *mloop_orig, *mloop_new, *ml_new;
MEdge *medge_orig, *med_orig, *med_new, *med_new_firstloop, *medge_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; MVert *mvert_new, *mvert_orig, *mv_orig, *mv_new, *mv_new_base;
@@ -875,7 +875,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
const unsigned int step_last = step_tot - (close ? 1 : 2); const unsigned int step_last = step_tot - (close ? 1 : 2);
const unsigned int mpoly_index_orig = totpoly ? edge_poly_map[i] : UINT_MAX; const unsigned int mpoly_index_orig = totpoly ? edge_poly_map[i] : UINT_MAX;
const bool has_mpoly_orig = (mpoly_index_orig != 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] = { const unsigned int mloop_index_orig[2] = {
vert_loop_map ? vert_loop_map[medge_new[i].v1] : UINT_MAX, vert_loop_map ? vert_loop_map[medge_new[i].v1] : UINT_MAX,

View File

@@ -4304,7 +4304,7 @@ static void radial_control_cancel(bContext *C, wmOperator *op)
static int radial_control_modal(bContext *C, wmOperator *op, const wmEvent *event) static int radial_control_modal(bContext *C, wmOperator *op, const wmEvent *event)
{ {
RadialControl *rc = op->customdata; 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; float delta[2], ret = OPERATOR_RUNNING_MODAL;
bool snap; bool snap;
float angle_precision = 0.0f; float angle_precision = 0.0f;