remove some warnings and possible use of un-initialized vars.
authorCampbell Barton <ideasman42@gmail.com>
Tue, 24 May 2011 17:25:11 +0000 (17:25 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 24 May 2011 17:25:11 +0000 (17:25 +0000)
source/blender/editors/armature/editarmature.c
source/blender/editors/space_graph/graph_select.c
source/blender/editors/space_view3d/drawobject.c
source/blender/windowmanager/intern/wm_operators.c

index b31bcc710f4bd97a14668d32c447b795ad2d3fc8..abf0839354403c2fad229e291beb635e8de5c5a2 100644 (file)
@@ -2491,14 +2491,12 @@ static int armature_click_extrude_invoke(bContext *C, wmOperator *op, wmEvent *e
        Scene *scene;
        ARegion *ar;
        View3D *v3d;
-       RegionView3D *rv3d;
        float *fp = NULL, tvec[3], oldcurs[3], mval_f[2];
        int retv;
 
        scene= CTX_data_scene(C);
        ar= CTX_wm_region(C);
        v3d = CTX_wm_view3d(C);
-       rv3d= CTX_wm_region_view3d(C);
        
        fp= give_cursor(scene, v3d);
        
index da7a95cdbf727ea9d64bc0216d6923bf40ad9f8b..76883027df1b9ddb4796c3437dcb9883d77f25a6 100644 (file)
@@ -1291,15 +1291,11 @@ static void graphkeys_mselect_column (bAnimContext *ac, const int mval[2], short
 static int graphkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
        bAnimContext ac;
-       ARegion *ar;
        short selectmode;
 
        /* get editor data */
        if (ANIM_animdata_get_context(C, &ac) == 0)
                return OPERATOR_CANCELLED;
-       
-       /* get useful pointers from animation context data */
-       ar= ac.ar;
 
        /* select mode is either replace (deselect all, then add) or add/extend */
        if (RNA_boolean_get(op->ptr, "extend"))
index ccfc45826cf11d17af2fb2575fe83a529cd0dd97..d122f8f064205681d3a22853f9b6f2cb2f3ea1e7 100644 (file)
@@ -3840,6 +3840,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
                                                case PART_DRAW_COL_ACC:
                                                        intensity = len_v3v3(pa->state.vel, pa->prev_state.vel)/((pa->state.time-pa->prev_state.time)*part->color_vec_max);
                                                        break;
+                                               default:
+                                                       intensity= 1.0f; /* should never happen */
                                        }
                                        CLAMP(intensity, 0.f, 1.f);
                                        weight_to_rgb(intensity, &ma_r, &ma_g, &ma_b);
index fc2c0338bdfeb32467295be1be250aa5bb2194c5..8ac7a3d7eb628131a1a6a250ac8974ee185408c1 100644 (file)
@@ -2835,6 +2835,8 @@ static void radial_control_paint_cursor(bContext *C, int x, int y, void *customd
                alpha = 0.75;
                break;
        default:
+               tex_radius= WM_RADIAL_CONTROL_DISPLAY_SIZE; /* note, this is a dummy value */
+               alpha = 0.75;
                break;
        }
 
@@ -3094,6 +3096,7 @@ static int radial_control_modal(bContext *C, wmOperator *op, wmEvent *event)
                        if(snap) new_value = DEG2RADF(((int)RAD2DEGF(new_value) + 5) / 10*10);
                        break;
                default:
+                       new_value = dist; /* dummy value, should this ever happen? - campbell */
                        break;
                }