fix for uninitialized value use in newly added fcurve normalized view.
authorCampbell Barton <ideasman42@gmail.com>
Wed, 30 Oct 2013 22:13:28 +0000 (22:13 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 30 Oct 2013 22:13:28 +0000 (22:13 +0000)
also quiet warning without openmp.

source/blender/editors/animation/anim_draw.c
source/blender/editors/sculpt_paint/paint_mask.c

index dcf9c8e623b32b6df7529fb1ee4e3e874f023dd8..25fcd76b513f143f01b772a2b0e1647e0240ded0 100644 (file)
@@ -377,7 +377,7 @@ short ANIM_get_normalization_flags(bAnimContext *ac)
 
 static float normalzation_factor_get(FCurve *fcu, short flag)
 {
-       float factor;
+       float factor = 1.0f;
 
        if (flag & ANIM_UNITCONV_RESTORE) {
                return 1.0f / fcu->prev_norm_factor;
index 2e9efcc02b29fbfe85c32f89eee2c9d8f086db39..87e267b107244cb9434fe9017c1ca4d4ba5ffb8a 100644 (file)
@@ -165,7 +165,9 @@ static int is_effected(float planes[4][4], const float co[3])
 
 int do_sculpt_mask_box_select(ViewContext *vc, rcti *rect, bool select, bool UNUSED(extend))
 {
+#ifdef _OPENMP
        Sculpt *sd = vc->scene->toolsettings->sculpt;
+#endif
        BoundBox bb;
        bglMats mats = {{0}};
        float clip_planes[4][4];
@@ -198,7 +200,7 @@ int do_sculpt_mask_box_select(ViewContext *vc, rcti *rect, bool select, bool UNU
 
        sculpt_undo_push_begin("Mask box fill");
 
-       #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
+#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
        for (i = 0; i < totnode; i++) {
                PBVHVertexIter vi;