warning cleanup, also made voxel.c and volumetric.c use BM_INLINE define rather then...
authorCampbell Barton <ideasman42@gmail.com>
Sat, 24 Apr 2010 10:08:07 +0000 (10:08 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 24 Apr 2010 10:08:07 +0000 (10:08 +0000)
26 files changed:
source/blender/blenkernel/intern/packedFile.c
source/blender/blenkernel/intern/seqeffects.c
source/blender/blenlib/intern/voxel.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/meshlaplacian.c
source/blender/editors/armature/poseobject.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_icons.c
source/blender/editors/mesh/editface.c
source/blender/editors/mesh/editmesh.c
source/blender/editors/mesh/editmesh_loop.c
source/blender/editors/mesh/editmesh_mods.c
source/blender/editors/mesh/meshtools.c
source/blender/editors/object/object_edit.c
source/blender/editors/sculpt_paint/paint_stroke.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_file/writeimage.c
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_outliner/outliner.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_sequencer/sequencer_select.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/util/editmode_undo.c
source/blender/gpu/intern/gpu_buffers.c
source/blender/python/intern/bpy_driver.c
source/blender/render/intern/source/volumetric.c

index 0c50cea075dfc6859d951c1aa19e0d5879fea642..fb973febf042645f391b6666401fac22e9382db5 100644 (file)
@@ -264,7 +264,7 @@ int writePackedFile(ReportList *reports, char *filename, PackedFile *pf, int gui
        char tempname[FILE_MAXDIR + FILE_MAXFILE];
 /*     void *data; */
        
-       if (guimode); //XXX  waitcursor(1);
+       if (guimode) {} //XXX  waitcursor(1);
        
        strcpy(name, filename);
        BLI_path_abs(name, G.sce);
@@ -308,7 +308,7 @@ int writePackedFile(ReportList *reports, char *filename, PackedFile *pf, int gui
                }
        }
        
-       if(guimode); //XXX waitcursor(0);
+       if(guimode) {} //XXX waitcursor(0);
 
        return (ret_value);
 }
index 33c90d1a94e5df85a86000c84dda389a961aa8b5..3c9227fd2a64d6760e3862422435264cb6fb31ad 100644 (file)
@@ -52,7 +52,7 @@
 #include "RNA_access.h"
 
 /* **** XXX **** */
-static void error() {}
+static void error(const char *error, ...) {}
 
 #define INT    96
 #define FLO    128
index 31ed116c40a6ac9e92eaa034bb045f42d837d3b3..2b04a49e848d3d7b3642b10d9cd9c14b2222bf78 100644 (file)
 
 #include "BKE_utildefines.h"
 
-
-#if defined( _MSC_VER ) && !defined( __cplusplus )
-# define inline __inline
-#endif // defined( _MSC_VER ) && !defined( __cplusplus )
-
-static inline float D(float *data,  int *res, int x, int y, int z)
+BM_INLINE float D(float *data,  int *res, int x, int y, int z)
 {
        CLAMP(x, 0, res[0]-1);
        CLAMP(y, 0, res[1]-1);
@@ -57,7 +52,7 @@ float voxel_sample_nearest(float *data, int *res, float *co)
 }
 
 // returns highest integer <= x as integer (slightly faster than floor())
-inline int FLOORI(float x)
+BM_INLINE int FLOORI(float x)
 {
        const int r = (int)x;
        return ((x >= 0.f) || (float)r == x) ? r : (r - 1);
@@ -65,7 +60,7 @@ inline int FLOORI(float x)
 
 // clamp function, cannot use the CLAMPIS macro, it sometimes returns unwanted results apparently related to gcc optimization flag -fstrict-overflow which is enabled at -O2
 // this causes the test (x + 2) < 0 with int x == 2147483647 to return false (x being an integer, x + 2 should wrap around to -2147483647 so the test < 0 should return true, which it doesn't)
-inline int _clamp(int a, int b, int c)
+BM_INLINE int _clamp(int a, int b, int c)
 {
        return (a < b) ? b : ((a > c) ? c : a);
 }
index 5e03dcfbefc050645d4164ac2e6baa686f2f0f5a..504c5b1e3b1ada9fd3ed7d04f5e0f987c735acbe 100644 (file)
@@ -88,7 +88,7 @@
 #endif
 
 /* ************* XXX *************** */
-static int okee() {return 0;}
+static int okee(const char *dummy) {return 0;}
 static void BIF_undo_push(const char *msg) {}
 /* ************* XXX *************** */
 
index f0f7bc9eb885c0aa871b6036444fd3bd878a2799..1b1448477ea90346421f701ce859975638a8837f 100644 (file)
@@ -65,7 +65,7 @@
 
 /* ************* XXX *************** */
 static void waitcursor(int val) {}
-static void progress_bar() {}
+static void progress_bar(int dummy_val, const char *dummy) {}
 static void start_progress_bar() {}
 static void end_progress_bar() {}
 static void error(char *str) { printf("error: %s\n", str); }
index 795a27c5642f39ba967a0773d74b1e51ad649562..dcd59a3185af92e1d71ec7feb93a472ecd576716 100644 (file)
@@ -78,9 +78,9 @@
 #include "armature_intern.h"
 
 /* ************* XXX *************** */
-static int pupmenu() {return 0;}
-static void error() {};
-static void BIF_undo_push() {}
+static int pupmenu(const char *dummy) {return 0;}
+static void error(const char *dummy) {};
+static void BIF_undo_push(const char *dummy) {}
 /* ************* XXX *************** */
 
 /* This function is used to indicate that a bone is selected and needs keyframes inserted */
index 4dd47059e0111b32813755e18bf6657a8a1672a8..426bf7fce049040c2541cb6d1d061a10d8210b0b 100644 (file)
@@ -962,7 +962,7 @@ static void ui_but_drop(bContext *C, wmEvent *event, uiBut *but, uiHandleButtonD
                        if(ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) {
                                ID *id= (ID *)wmd->poin;
                                
-                               if(but->poin==NULL && but->rnapoin.data==NULL);
+                               if(but->poin==NULL && but->rnapoin.data==NULL) {}
                                button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
                                BLI_strncpy(data->str, id->name+2, data->maxlen);
                                button_activate_state(C, but, BUTTON_STATE_EXIT);
index 1e2b166ca82837b9a14c63703f9415126d219c1d..7ffd46c34c794fc8d396499e6d2652d331e88fc6 100644 (file)
@@ -572,8 +572,7 @@ static void init_iconfile_list(struct ListBase *list)
        if(!BLI_getwdN(olddir)) 
                restoredir = 0;
        totfile = BLI_getdir(icondirstr, &dir);
-       if (restoredir && !chdir(olddir))
-               ; /* fix warning about checking return value */
+       if (restoredir && !chdir(olddir)) {} /* fix warning about checking return value */
 
        for(i=0; i<totfile; i++) {
                if( (dir[i].type & S_IFREG) ) {
index 7d47473e7390171f55d7b712c622af3dbf66bd8e..e36035081ce3fff4be751a7423fa68efbdfb0c64 100644 (file)
@@ -77,7 +77,7 @@
 #include "mesh_intern.h"
 
 /* ***************** XXX **************** */
-static int pupmenu() {return 0;}
+static int pupmenu(const char *dummy) {return 0;}
 /* ***************** XXX **************** */
 
 
index e3f0d96ccfce23a987193a651350d276a8a18a74..5de869f09d3e5c10968f04b0f3a3754f6c8b4c6b 100644 (file)
@@ -87,8 +87,8 @@ editmesh.c:
 */
 
 /* XXX */
-static void BIF_undo_push() {}
-static void error() {}
+static void BIF_undo_push(const char *dummy) {}
+static void error(const char *dummy) {}
 
 
 /* ***************** HASH ********************* */
index 643785ca200bc9cc60fe7fbeccc7fbcdc38ea507..760c911fdee8e6e63db66182aa3b7587e5aa9d87 100644 (file)
@@ -75,9 +75,9 @@ editmesh_loop: tools with own drawing subloops, select, knife, subdiv
 #include "mesh_intern.h"
 
 /* **** XXX ******** */
-static void BIF_undo_push() {}
+static void BIF_undo_push(const char *dummy) {}
 static void BIF_undo() {}
-static void error() {}
+static void error(const char *dummy) {}
 static int qtest() {return 0;}
 /* **** XXX ******** */
 
index e82c289a6ead42ecb8d55cd9f167e91ae6fbd25e..612facb85c1406ab988f19ef42127a765233f1e3 100644 (file)
@@ -90,7 +90,7 @@ editmesh_mods.c, UI level access, no geometry changes
 
 /* XXX */
 static void waitcursor(int val) {}
-static int pupmenu() {return 0;}
+static int pupmenu(const char *dummy) {return 0;}
 
 /* ****************************** MIRROR **************** */
 
index 99bca7e907360bb2b6a4aa0dc921ead8042d19bf..a08e08c25c0b07f63415736c9ab7c293e5765070 100644 (file)
@@ -83,7 +83,7 @@
 #include "mesh_intern.h"
 
 /* XXX */
-static int pupmenu() {return 0;}
+static int pupmenu(const char *dummy) {return 0;}
 /* XXX */
 
 
index 1ac84eb48ce4be5bbfa8f2d8327dbe1efb9dda26..6631f5fc0d2089e335defe1c1cf3172fa3360c47 100644 (file)
 #include "object_intern.h"     // own include
 
 /* ************* XXX **************** */
-static void error() {}
+static void error(const char *dummy) {}
 static void waitcursor(int val) {}
 static int pupmenu(const char *msg) {return 0;}
 
index c25b56858442d783c9dcd739e2df1d7b685feb2b..03454a305bae23564622d17224e5954288b47289 100644 (file)
@@ -279,8 +279,9 @@ int paint_stroke_modal(bContext *C, wmOperator *op, wmEvent *event)
                if(stroke->stroke_started) {
                        if(paint_smooth_stroke(stroke, mouse, event)) {
                                if(paint_space_stroke_enabled(stroke->brush)) {
-                                       if(!paint_space_stroke(C, op, event, mouse))
-                                               ;//ED_region_tag_redraw(ar);
+                                       if(!paint_space_stroke(C, op, event, mouse)) {
+                                               //ED_region_tag_redraw(ar);
+                                       }
                                }
                                else
                                        paint_brush_stroke_add_step(C, op, event, mouse);
index ea1307a6784dc191faef1f684d474feb354eafeb..0674568579ebe66048ca9706707035b42c99942f 100644 (file)
@@ -739,7 +739,7 @@ static void filelist_read_dir(struct FileList* filelist)
        BLI_cleanup_dir(G.sce, filelist->dir);
        filelist->numfiles = BLI_getdir(filelist->dir, &(filelist->filelist));
 
-       if(!chdir(wdir)) /* fix warning about not checking return value */;
+       if(!chdir(wdir)) {} /* fix warning about not checking return value */
        filelist_setfiletypes(filelist, G.have_quicktime);
        filelist_filter(filelist);
 }
index ade0b7db0ca68ef84935d4c441dec5c7833caaa9..d05ed3e992e40c2454a93050183c5c8b79cd92c2 100644 (file)
 #include "file_intern.h"
 
 /* XXX */
-static void error() {}
+static void error(const char *dummy) {}
 static void waitcursor(int val) {}
-static void activate_fileselect() {}
-static int saveover() {return 0;}
+static void activate_fileselect(int d1, char *d2, char *d3, void *d4) {}
+static int saveover(const char *dummy) {return 0;}
 /* XXX */
 
 
index aa3a0f58fa96d2d42054c3038bc3366c99f244e9..aaae7e156cdecb6ad9ea4e57a0c1790329f7f5dd 100644 (file)
 #define B_SIMACLONEBROWSE      25
 #define B_SIMACLONEDELETE      26
 
-/* XXX */
-static int simaFaceDraw_Check() {return 0;}
-static int simaUVSel_Check() {return 0;}
-/* XXX */
-
 /* proto */
 static void image_editvertex_buts(const bContext *C, uiBlock *block);
 
@@ -203,7 +198,9 @@ static void image_transform_but_attr(SpaceImage *sima, int *imx, int *imy, int *
 /* is used for both read and write... */
 static void image_editvertex_buts(const bContext *C, uiBlock *block)
 {
+       Scene *scene= CTX_data_scene(C);
        SpaceImage *sima= CTX_wm_space_image(C);
+       Image *ima= sima->image;
        Object *obedit= CTX_data_edit_object(C);
        static float ocent[2];
        float cent[2]= {0.0, 0.0};
@@ -218,24 +215,24 @@ static void image_editvertex_buts(const bContext *C, uiBlock *block)
        em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
        for (efa= em->faces.first; efa; efa= efa->next) {
                tf= CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
-               if (simaFaceDraw_Check(efa, tf)) {
+               if (uvedit_face_visible(scene, ima, efa, tf)) {
                        
-                       if (simaUVSel_Check(efa, tf, 0)) {
+                       if (uvedit_uv_selected(scene, efa, tf, 0)) {
                                cent[0]+= tf->uv[0][0];
                                cent[1]+= tf->uv[0][1];
                                nactive++;
                        }
-                       if (simaUVSel_Check(efa, tf, 1)) {
+                       if (uvedit_uv_selected(scene, efa, tf, 1)) {
                                cent[0]+= tf->uv[1][0];
                                cent[1]+= tf->uv[1][1];
                                nactive++;
                        }
-                       if (simaUVSel_Check(efa, tf, 2)) {
+                       if (uvedit_uv_selected(scene, efa, tf, 2)) {
                                cent[0]+= tf->uv[2][0];
                                cent[1]+= tf->uv[2][1];
                                nactive++;
                        }
-                       if (efa->v4 && simaUVSel_Check(efa, tf, 3)) {
+                       if (efa->v4 && uvedit_uv_selected(scene, efa, tf, 3)) {
                                cent[0]+= tf->uv[3][0];
                                cent[1]+= tf->uv[3][1];
                                nactive++;
@@ -282,20 +279,20 @@ static void image_editvertex_buts(const bContext *C, uiBlock *block)
 
                for (efa= em->faces.first; efa; efa= efa->next) {
                        tf= CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
-                       if (simaFaceDraw_Check(efa, tf)) {
-                               if (simaUVSel_Check(efa, tf, 0)) {
+                       if (uvedit_face_visible(scene, ima, efa, tf)) {
+                               if (uvedit_uv_selected(scene, efa, tf, 0)) {
                                        tf->uv[0][0]+= delta[0];
                                        tf->uv[0][1]+= delta[1];
                                }
-                               if (simaUVSel_Check(efa, tf, 1)) {
+                               if (uvedit_uv_selected(scene, efa, tf, 1)) {
                                        tf->uv[1][0]+= delta[0];
                                        tf->uv[1][1]+= delta[1];
                                }
-                               if (simaUVSel_Check(efa, tf, 2)) {
+                               if (uvedit_uv_selected(scene, efa, tf, 2)) {
                                        tf->uv[2][0]+= delta[0];
                                        tf->uv[2][1]+= delta[1];
                                }
-                               if (efa->v4 && simaUVSel_Check(efa, tf, 3)) {
+                               if (efa->v4 && uvedit_uv_selected(scene, efa, tf, 3)) {
                                        tf->uv[3][0]+= delta[0];
                                        tf->uv[3][1]+= delta[1];
                                }
index 1ec203ac740eb2e77eb25725504a1c959af91093..f624fa235416f18f1ec3e74c1a667d2c82de5448 100644 (file)
 
 /* ************* XXX **************** */
 
-static void error() {}
+static void error(const char *dummy, ...) {}
 
 /* ********************************** */
 
index de0b048e9d50045e95c2a589c45340a37be8ab80..7f95c1cb2709bac66ab9d49aa1337ddefd1567df 100644 (file)
 //static Sequence *_last_seq=0;
 //static int _last_seq_init=0;
 /* XXX */
-static void error() {}
+static void error(const char *dummy) {}
 static void waitcursor(int val) {}
-static void activate_fileselect() {}
-static int pupmenu() {return 0;}
-static int okee() {return 0;}
+static void activate_fileselect(int d1, char *d2, char *d3, void *d4) {}
+static int pupmenu(const char *dummy) {return 0;}
+static int okee(const char *dummy) {return 0;}
 
 
 /* XXX */
index 1074c3572fc665ccefda2e31cb531672660f129f..a49394d3a12a1467769fd3f107d2084eac78a2fb 100644 (file)
@@ -64,8 +64,7 @@
 
 /* own include */
 #include "sequencer_intern.h"
-static void *find_nearest_marker() {return NULL;}
-static void deselect_markers() {}
+static void *find_nearest_marker(int d1, int d2) {return NULL;}
        
 void select_surrounding_handles(Scene *scene, Sequence *test) /* XXX BRING BACK */
 {
@@ -349,7 +348,7 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
                                marker->flag |= SELECT;
                }
                else {
-                       deselect_markers(0, 0);
+                       /* deselect_markers(0, 0); */ /* XXX, in 2.4x, seq selection used to deselect all, need to re-thnik this for 2.5 */
                        marker->flag |= SELECT;                         
                }
                
index 495f240a97af5848cde64fa6fc8994b947528956..1414a51c6c9a165fbc2496ecbd8bc23955b54b52 100644 (file)
@@ -528,7 +528,7 @@ static void do_lasso_select_mesh_uv(short mcords[][2], short moves, short select
        } else { /* Vert Sel*/
                for (efa= em->faces.first; efa; efa= efa->next) {
                        tf = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
-                       if (simaFaceDraw_Check(efa, tf)) {              
+                       if (uvedit_face_visible(scene, ima, efa, tf)) {         
                                nverts= efa->v4? 4: 3;
                                for(i=0; i<nverts; i++) {
                                        if ((select) != (simaUVSel_Check(efa, tf, i))) {
index 8597454fdb57b8bdd8b0d926099d164d02d3bc39..4b8d5c1df67615c0081d549945165a1a11f6c119 100644 (file)
@@ -76,7 +76,7 @@ void undo_editmode_menu(void)                         // history menu
 /* ********************************************************************* */
 
 /* ****** XXX ***** */
-void error() {}
+void error(const char *dummy) {}
 /* ****** XXX ***** */
 
 
index 74bef43e9281cb08b2015c256e34ecb11415097b..dd5520608f186fd08f4419072f499e16490dacdf 100644 (file)
@@ -1515,8 +1515,9 @@ void GPU_buffer_unbind()
                else
                        break;
        }
-       if( GLStates != 0 )
+       if( GLStates != 0 ) {
                DEBUG_VBO( "Some weird OpenGL state is still set. Why?" );
+       }
        if( useVBOs )
                glBindBufferARB( GL_ARRAY_BUFFER_ARB, 0 );
 }
index 00ea556792e8f300d15e3a0b3d73270322d67d7b..5b1a8958247839bf937c27091281df95d364717f 100644 (file)
@@ -24,6 +24,8 @@
 /* ****************************************** */
 /* Drivers - PyExpression Evaluation */
 
+#include <Python.h>
+
 #include "DNA_anim_types.h"
 
 #include "BLI_listbase.h"
@@ -32,8 +34,6 @@
 #include "BKE_fcurve.h"
 #include "BKE_global.h"
 
-#include <Python.h>
-
 /* for pydrivers (drivers using one-line Python expressions to express relationships between targets) */
 PyObject *bpy_pydriver_Dict = NULL;
 
index 142bef7180d2d5699ee69734635cfd1b00c62fa3..c74bb9d4a55a4ef3b075d863edf896776d180cc5 100644 (file)
 #include "volumetric.h"
 #include "volume_precache.h"
 
-#if defined( _MSC_VER ) && !defined( __cplusplus )
-# define inline __inline
-#endif // defined( _MSC_VER ) && !defined( __cplusplus )
-
 /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
 /* defined in pipeline.c, is hardcopy of active dynamic allocated Render */
 /* only to be used here in this file, it's for speed */
@@ -67,7 +63,7 @@ extern struct Render R;
 /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
 
 /* luminance rec. 709 */
-inline float luminance(float* col)
+BM_INLINE float luminance(float* col)
 {
        return (0.212671f*col[0] + 0.71516f*col[1] + 0.072169f*col[2]);
 }