warning fixes.
authorCampbell Barton <ideasman42@gmail.com>
Sat, 23 Oct 2010 16:03:31 +0000 (16:03 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 23 Oct 2010 16:03:31 +0000 (16:03 +0000)
source/blender/blenkernel/intern/constraint.c
source/blender/editors/object/object_constraint.c
source/blender/editors/space_script/script_edit.c
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/modifiers/CMakeLists.txt
source/blender/render/intern/raytrace/rayobject.cpp
source/blender/windowmanager/intern/wm_init_exit.c
source/creator/creator.c

index 5dad01a126f165dc4772e328bf088fafc0b4991b..c3f05e497f1e282fefd968339242e7890090987a 100644 (file)
@@ -2015,6 +2015,7 @@ static void pycon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraintT
 static void pycon_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
 {
 #ifdef DISABLE_PYTHON
+       (void)con; (void)cob; (void)targets; /* unused */
        return;
 #else
        bPythonConstraint *data= con->data;
index 02c88d4149bf5d13ee9c136b376c25c121cf59a5..09760a8f51bd8f2406e02d51494bd16c349f51a4 100644 (file)
@@ -200,7 +200,10 @@ char *buildmenu_pyconstraints (Text *con_text, int *pyconindex)
 /* this callback gets called when the 'refresh' button of a pyconstraint gets pressed */
 void update_pyconstraint_cb (void *arg1, void *arg2)
 {
-#ifndef DISABLE_PYTHON
+#ifdef DISABLE_PYTHON
+       (void)arg1; /* unused */
+       (void)arg2; /* unused */
+#else
        Object *owner= (Object *)arg1;
        bConstraint *con= (bConstraint *)arg2;
        if (owner && con)
index 7e3b14ca04a6ace25646772c8fb0d149bfe82dad..23bc385c758d83ef90ef66285f4cba322abbaa5f 100644 (file)
@@ -60,6 +60,8 @@ static int run_pyfile_exec(bContext *C, wmOperator *op)
                ED_region_tag_redraw(ar);
                return OPERATOR_FINISHED;
        }
+#else
+       (void)C; /* unused */
 #endif
        return OPERATOR_CANCELLED; /* FAIL */
 }
@@ -89,6 +91,8 @@ static int script_reload_exec(bContext *C, wmOperator *UNUSED(op))
        BPY_eval_string(C, "__import__('bpy').utils.load_scripts(reload_scripts=True)");
        WM_cursor_wait(0);
        return OPERATOR_FINISHED;
+#else
+       (void)C; /* unused */
 #endif
        return OPERATOR_CANCELLED;
 }
index 8d4f3f87f669178ad6fad54d14d915c917b8cdf3..af29e57548238fcc7d7d5903097edcedebc93a17 100644 (file)
@@ -558,6 +558,8 @@ static int run_script_poll(bContext *C)
 static int run_script_exec(bContext *C, wmOperator *op)
 {
 #ifdef DISABLE_PYTHON
+       (void)C; /* unused */
+
        BKE_report(op->reports, RPT_ERROR, "Python disabled in this build");
 
        return OPERATOR_CANCELLED;
index 7722ca5605bde1cedbc58ad7d694a5f5b5f0488e..30880db0c9046b05c9450bac24581d7d76954a0b 100644 (file)
@@ -1459,7 +1459,7 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas
 {
        RegionView3D *rv3d= ar->regiondata;
        ListBase *lb;
-       DupliObject *dob_prev= NULL, *dob, *dob_next;
+       DupliObject *dob_prev= NULL, *dob, *dob_next= NULL;
        Base tbase;
        BoundBox bb, *bb_tmp; /* use a copy because draw_object, calls clear_mesh_caches */
        GLuint displist=0;
index 40f0ad127cdbe962da3a45ce40f1313a2ef30c87..7524244c7014f7dc0e72fb84005939f56547981b 100644 (file)
@@ -85,7 +85,7 @@ ENDIF(WITH_MOD_BOOLEAN)
 IF(WITH_MOD_DECIMATE)
        ADD_DEFINITIONS(-DWITH_MOD_DECIMATE)
        LIST(APPEND INC ../../../intern/decimation/extern)
-ENDIF(WITH_MOD_BOOLEAN)
+ENDIF(WITH_MOD_DECIMATE)
 
 IF(NOT WITH_MOD_FLUID)
        ADD_DEFINITIONS(-DDISABLE_ELBEEM)
index 84ec56e131aac2c87e6832ef15a27c7286accb40..119a62ad05ac3135f3902f65ae7a90014067b4bb 100644 (file)
@@ -533,7 +533,11 @@ float RE_rayobject_cost(RayObject *r)
                r = RE_rayobject_align( r );
                return r->api->cost( r );
        }
-       else assert(0);
+       else
+       {
+               assert(0);
+               return 1.0; /* XXX, better default value? */
+       }
 }
 
 void RE_rayobject_hint_bb(RayObject *r, RayHint *hint, float *min, float *max)
index b319058ce5cd2cefdf51a8e8a665ab7bb40d751d..e373579577ded4d5a4c7f8049f40f44ee20af6c6 100644 (file)
@@ -145,6 +145,9 @@ void WM_init(bContext *C, int argc, char **argv)
        BPY_set_context(C); /* necessary evil */
        BPY_start_python(argc, argv);
        BPY_load_user_modules(C);
+#else
+       (void)argc; /* unused */
+       (void)argv; /* unused */
 #endif
 
        wm_init_reports(C); /* reports cant be initialized before the wm */
@@ -212,7 +215,7 @@ int WM_init_game(bContext *C)
        wmWindow* win;
 
        ScrArea *sa;
-       ARegion *ar;
+       ARegion *ar= NULL;
 
        Scene *scene= CTX_data_scene(C);
 
index ed2f671a1616367e5da7314579a8bdaf038cf5f8..25f01ea0beacd92e9ae7e70935e5e110b3e94aea 100644 (file)
@@ -853,6 +853,7 @@ static int run_python(int argc, char **argv, void *data)
                return 0;
        }
 #else
+       (void)argc; (void)argv; (void)data; /* unused */
        printf("This blender was built without python support\n");
        return 0;
 #endif /* DISABLE_PYTHON */
@@ -868,6 +869,7 @@ static int run_python_console(int UNUSED(argc), char **argv, void *data)
 
        return 0;
 #else
+       (void)argv; (void)data; /* unused */
        printf("This blender was built without python support\n");
        return 0;
 #endif /* DISABLE_PYTHON */