Silencing some compiler warnings for mingw
authorJoshua Leung <aligorith@gmail.com>
Wed, 21 Oct 2009 10:56:31 +0000 (10:56 +0000)
committerJoshua Leung <aligorith@gmail.com>
Wed, 21 Oct 2009 10:56:31 +0000 (10:56 +0000)
* Unused functions
* Uninitialised vars

13 files changed:
source/blender/editors/include/ED_physics.h
source/blender/editors/mesh/editmesh_add.c
source/blender/editors/mesh/editmesh_mods.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/physics/particle_object.c
source/blender/editors/physics/physics_intern.h
source/blender/editors/screen/screen_ops.c
source/blender/editors/space_console/console_ops.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_outliner/outliner.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/drawvolume.c
source/blender/editors/space_view3d/view3d_buttons.c

index df303d7c9f1edf3d78cc4e6bd4147adb8adb0429..57d0fc271b891e75a5c17b13242acc861505c7da 100644 (file)
 
 struct wmKeyConfig;
 
+/* particle_edit.c */
+int PE_poll(struct bContext *C);
+int PE_hair_poll(struct bContext *C);
+int PE_poll_3dview(struct bContext *C);
+
 /* operators */
 void ED_operatortypes_physics(void);
 void ED_keymap_physics(struct wmKeyConfig *keyconf);
index 1514f725705a132e514ed9d07c34e0f73a245cbf..e7cf03cd230bb65dee392eb22026df25174824ff 100644 (file)
@@ -1311,7 +1311,7 @@ static void make_prim_ext(bContext *C, int type, int tot, int seg,
                int subdiv, float dia, float depth, int ext, int fill)
 {
        Object *obedit= CTX_data_edit_object(C);
-       int newob;
+       int newob = 0;
        float mat[4][4];
 
        if(obedit==NULL || obedit->type!=OB_MESH) {
index 02fb166a4e1483d9259f3c832604b20d2720c2ff..737f658d46fcb64923a6c5c471f9df516015e0ff 100644 (file)
@@ -4240,7 +4240,6 @@ void editmesh_align_view_to_selected(Object *obedit, EditMesh *em, wmOperator *o
 
 static int smooth_vertex(bContext *C, wmOperator *op)
 {
-       ToolSettings *ts= CTX_data_tool_settings(C);
        Object *obedit= CTX_data_edit_object(C);
        EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
        EditVert *eve, *eve_mir = NULL;
index be4df93eff3c7aca8eed7a39c4eab7f47ee71570..9875051e1ad15eab04435296a3aceb92b3ca4ffe 100644 (file)
@@ -851,7 +851,7 @@ static void pe_deflect_emitter(Scene *scene, Object *ob, PTCacheEdit *edit)
        ParticleSystemModifierData *psmd;
        POINT_P; KEY_K;
        int index;
-       float *vec, *nor, dvec[3], dot, dist_1st;
+       float *vec, *nor, dvec[3], dot, dist_1st=0.0f;
        float hairimat[4][4], hairmat[4][4];
 
        if(edit==NULL || edit->psys==NULL || (pset->flag & PE_DEFLECT_EMITTER)==0 || (edit->psys->flag & PSYS_GLOBAL_HAIR))
@@ -2819,7 +2819,7 @@ static void brush_puff(PEData *data, int point_index)
        PTCacheEditPoint *point = edit->points + point_index;
        KEY_K;
        float mat[4][4], imat[4][4];
-       float lastco[3], rootco[3], co[3], nor[3], kco[3], dco[3], fac, length;
+       float lastco[3], rootco[3], co[3], nor[3], kco[3], dco[3], fac=0.0f, length=0.0f;
 
        if(psys && !(psys->flag & PSYS_GLOBAL_HAIR)) {
                psys_mat_hair_to_global(data->ob, data->dm, psys->part->from, psys->particles + point_index, mat);
index 34e2b062e98819d538ba02efd2b2e6710bcc35b3..d227591739b17269741105055481aba8e1fa5a86 100644 (file)
@@ -601,7 +601,7 @@ static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
        ParticleData *pa;
        PTCacheEdit *edit;
        PTCacheEditPoint *point;
-       PTCacheEditKey *ekey;
+       PTCacheEditKey *ekey = NULL;
        HairKey *key;
        BVHTreeFromMesh bvhtree;
        BVHTreeNearest nearest;
index a930d8663dd8e0b473176a7d9ce5e54403203d18..babaaefe155973e1956f83f9001f36b13f16cde0 100644 (file)
 struct wmOperatorType;
 
 /* particle_edit.c */
-int PE_poll(struct bContext *C);
-int PE_hair_poll(struct bContext *C);
-int PE_poll_3dview(struct bContext *C);
-
 void PARTICLE_OT_select_all_toggle(struct wmOperatorType *ot);
 void PARTICLE_OT_select_first(struct wmOperatorType *ot);
 void PARTICLE_OT_select_last(struct wmOperatorType *ot);
index aadba50bb84e1a38fec53d30ebd0897206d1e321..0baadf8d01a48d3c2bdd87bf92da51f7f5dcd923 100644 (file)
@@ -2520,7 +2520,7 @@ static ScrArea *find_area_showing_r_result(bContext *C)
 {
        wmWindowManager *wm= CTX_wm_manager(C);
        wmWindow *win;
-       ScrArea *sa;
+       ScrArea *sa = NULL;
        SpaceImage *sima;
        
        /* find an imagewindow showing render result */
index ccf7dbff946170b41e9915c06138ec01240ad8e5..a2e11dc6bd537e83350dd8fc91c67863a7d97338 100644 (file)
@@ -135,6 +135,7 @@ static char cursor_char_prev(ConsoleLine *cl)
        return cl->line[cl->cursor-1];
 }
 
+#if 0 // XXX unused 
 static char cursor_char_next(ConsoleLine *cl)
 {
        /* assume cursor is clamped */
@@ -159,8 +160,10 @@ static void console_history_debug(const bContext *C)
 {
        SpaceConsole *sc= CTX_wm_space_console(C);
 
+       
        console_lb_debug__internal(&sc->history);
 }
+#endif
 
 static ConsoleLine *console_lb_add__internal(ListBase *lb, ConsoleLine *from)
 {
index 42c664520fe3a3f7e15d7f82450f1a6e6d981151..9f60f94defa9707a2adb6d57e1c2c4c5be71cb57 100644 (file)
@@ -1077,35 +1077,7 @@ static void node_composit_buts_renderlayers(uiLayout *layout, PointerRNA *ptr)
        }
 }
 
-static void node_blur_relative_cb(bContext *C, void *node, void *poin2)
-{
-       bNode *nodev= node;
-       NodeBlurData *nbd= nodev->storage;
-       if(nbd->image_in_width != 0){
-               if(nbd->relative){ /* convert absolute values to relative */
-                       nbd->percentx= (float)(nbd->sizex)/nbd->image_in_width;
-                       nbd->percenty= (float)(nbd->sizey)/nbd->image_in_height;
-               }else{ /* convert relative values to absolute */
-                       nbd->sizex= (int)(nbd->percentx*nbd->image_in_width);
-                       nbd->sizey= (int)(nbd->percenty*nbd->image_in_height);
-               }
-       }
-       // allqueue(REDRAWNODE, 0);
-}
-static void node_blur_update_sizex_cb(bContext *C, void *node, void *poin2)
-{
-       bNode *nodev= node;
-       NodeBlurData *nbd= nodev->storage;
 
-       nbd->sizex= (int)(nbd->percentx*nbd->image_in_width);
-}
-static void node_blur_update_sizey_cb(bContext *C, void *node, void *poin2)
-{
-       bNode *nodev= node;
-       NodeBlurData *nbd= nodev->storage;
-
-       nbd->sizey= (int)(nbd->percenty*nbd->image_in_height);
-}
 static void node_composit_buts_blur(uiLayout *layout, PointerRNA *ptr)
 {
        uiLayout *col;
index 5e67e9372fc80407122a2374f63f180fe5795461..bc203a9c80b0a147e6210a23bacb88925c2cf781 100644 (file)
@@ -3771,9 +3771,8 @@ static void do_outliner_drivers_editop(SpaceOops *soops, ListBase *tree, short m
                        }
                        
                        /* only if ID and path were set, should we perform any actions */
-                       // FIXME: if whole array flag is set, mus add the entire array
                        if (id && path) {
-                               int arraylen, i;
+                               int arraylen;
                                
                                /* array checks */
                                if (flag & KSP_FLAG_WHOLE_ARRAY) {
index b4ffc0224712aa2a1e02f51ba8d48cc5610d9c91..22fd77afd88bc2a26c304816717ccd6fb173aa21 100644 (file)
@@ -4157,7 +4157,7 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Obj
        PTCacheEditKey *key;
        ParticleEditSettings *pset = PE_settings(scene);
        int i, k, totpoint = edit->totpoint, timed = pset->flag & PE_FADE_TIME ? pset->fade_frames : 0;
-       int steps;
+       int steps=1;
        char nosel[4], sel[4];
        float sel_col[3];
        float nosel_col[3];
index a1a59fb0e6a9e632b263a0f6bcc88cfb88a7dd94..3c80441b9e648d6bb8843acf34cd969524e6df10 100644 (file)
@@ -217,7 +217,7 @@ void draw_volume(Scene *scene, ARegion *ar, View3D *v3d, Base *base, GPUTexture
        RegionView3D *rv3d= ar->regiondata;
 
        float viewnormal[3];
-       int i, j, n, good_index, count = 0;
+       int i, j, n, good_index;
        float d, d0, dd, ds;
        float *points = NULL;
        int numpoints = 0;
index 0cdf849d4537e176eeeb206e1c93f77a23edd281..276ce52c2a9edb2c0c9a2e4e5c8db921f5586d2b 100644 (file)
@@ -1300,6 +1300,7 @@ static void view3d_panel_preview(bContext *C, ARegion *ar, short cntrl)   // VIEW3
 }
 #endif
 
+#if 0 // XXX not used
 static void delete_sketch_armature(bContext *C, void *arg1, void *arg2)
 {
        BIF_deleteSketch(C);
@@ -1316,6 +1317,7 @@ static void assign_template_sketch_armature(bContext *C, void *arg1, void *arg2)
        BIF_setTemplate(C, index);
 }
 
+
 static int view3d_panel_bonesketch_spaces_poll(const bContext *C, PanelType *pt)
 {
        Object *obedit = CTX_data_edit_object(C);
@@ -1432,8 +1434,6 @@ static void view3d_panel_bonesketch_spaces(const bContext *C, Panel *pa)
        uiBlockEndAlign(block);
 }
 
-#if 0 // XXX not used
-
 /* op->invoke */
 static void redo_cb(bContext *C, void *arg_op, void *arg2)
 {
@@ -1496,26 +1496,7 @@ void view3d_buttons_register(ARegionType *art)
        strcpy(pt->label, "Grease Pencil");
        pt->draw= gpencil_panel_standard;
        BLI_addtail(&art->paneltypes, pt);
-/*
-       pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel properties");
-       strcpy(pt->idname, "VIEW3D_PT_properties");
-       strcpy(pt->label, "View Properties");
-       pt->draw= view3d_panel_properties;
-       BLI_addtail(&art->paneltypes, pt);
-
-       pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel transform spaces");
-       strcpy(pt->idname, "VIEW3D_PT_transform spaces");
-       strcpy(pt->label, "Transform Orientations");
-       pt->draw= view3d_panel_transform_spaces;
-       BLI_addtail(&art->paneltypes, pt);
-
-       pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel bonesketch spaces");
-       strcpy(pt->idname, "VIEW3D_PT_bonesketch_spaces");
-       strcpy(pt->label, "Bone Sketching");
-       pt->draw= view3d_panel_bonesketch_spaces;
-       pt->poll= view3d_panel_bonesketch_spaces_poll;
-       BLI_addtail(&art->paneltypes, pt);
-*/
+       
        // XXX view3d_panel_preview(C, ar, 0);
 }