diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-07-31 05:40:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-07-31 05:40:15 +0400 |
commit | 2a727083c9cf6bb10b7506e8ed365831c458babc (patch) | |
tree | a992628090a4526f8874311f6b5e44ab98e3ecce | |
parent | c371f49d9aaf2c9eca90329954fe217efb5cf3f6 (diff) |
fix for warnings and implicit declarations
also fixed smoke comparing a float's mem-location rather then its value.
23 files changed, 40 insertions, 35 deletions
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index b77f4a8fcd1..c1b14a14f8c 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -140,6 +140,9 @@ char **BLF_dir_get(int *ndir); /* Free the data return by BLF_dir_get. */ void BLF_dir_free(char **dirs, int count); +/* Set the current draw mode. */ +void BLF_mode(int mode); + /* font->flags. */ #define BLF_ROTATION (1<<0) #define BLF_CLIPPING (1<<1) diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index 144ed3bc624..b65d77751e2 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -33,6 +33,7 @@ #include "DNA_modifier_types.h" /* needed for all enum typdefs */ #include "BKE_customdata.h" +struct ID; struct EditMesh; struct DerivedMesh; struct DagForest; diff --git a/source/blender/blenkernel/intern/exotic.c b/source/blender/blenkernel/intern/exotic.c index bc9a0ee99c1..8827897a509 100644 --- a/source/blender/blenkernel/intern/exotic.c +++ b/source/blender/blenkernel/intern/exotic.c @@ -334,7 +334,7 @@ static void read_stl_mesh_ascii(Scene *scene, char *str) */ numtenthousand = 1; vertdata = malloc(numtenthousand*3*30000*sizeof(float)); // uses realloc! - if (!vertdata); STLALLOCERROR; + if (!vertdata) { STLALLOCERROR; } linenum = 1; /* Get rid of the first line */ @@ -357,7 +357,7 @@ static void read_stl_mesh_ascii(Scene *scene, char *str) ++numtenthousand; vertdata = realloc(vertdata, numtenthousand*3*30000*sizeof(float)); - if (!vertdata); STLALLOCERROR; + if (!vertdata) { STLALLOCERROR; } } /* Don't read normal, but check line for proper syntax anyway @@ -1687,7 +1687,7 @@ static void displist_to_objects(Scene *scene, ListBase *lbase) if(totvert==0) { - if(ivsurf==0) ; //XXX error("Found no data"); + if(ivsurf==0) {}; //XXX error("Found no data"); if(lbase->first) BLI_freelistN(lbase); return; diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 8935d33b3bf..d86d563aaa2 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -5832,7 +5832,7 @@ static void smokeModifier_freeData(ModifierData *md) static void smokeModifier_deformVerts( ModifierData *md, Object *ob, DerivedMesh *derivedData, - float (*vertexCos)[3], int numVerts) + float (*vertexCos)[3], int numVerts, int useRenderParams, int isFinalCalc) { SmokeModifierData *smd = (SmokeModifierData*) md; DerivedMesh *dm = NULL; diff --git a/source/blender/blenkernel/intern/sequence.c b/source/blender/blenkernel/intern/sequence.c index 3eeecd94a85..4832086ac88 100644 --- a/source/blender/blenkernel/intern/sequence.c +++ b/source/blender/blenkernel/intern/sequence.c @@ -58,7 +58,7 @@ /* **** XXX ******** */ static int seqrectx= 0; /* bad bad global! */ static int seqrecty= 0; -static void waitcursor() {} +static void waitcursor(int val) {} static int blender_test_break() {return 0;} /* **** XXX ******** */ diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index 7870e53963d..fbf6beb835f 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -1144,7 +1144,7 @@ static void bresenham_linie_3D(SmokeModifierData *smd, int x1, int y1, int z1, i calc_voxel_transp(smd, pixel, tRay); else calc_voxel_transp_big(smd, pixel, tRay); - if(tRay < 0) + if(*tRay < 0.0f) return; if (err_1 > 0) { pixel[1] += y_inc; @@ -1166,7 +1166,7 @@ static void bresenham_linie_3D(SmokeModifierData *smd, int x1, int y1, int z1, i calc_voxel_transp(smd, pixel, tRay); else calc_voxel_transp_big(smd, pixel, tRay); - if(tRay < 0) + if(*tRay < 0.0f) return; if (err_1 > 0) { pixel[0] += x_inc; @@ -1188,7 +1188,7 @@ static void bresenham_linie_3D(SmokeModifierData *smd, int x1, int y1, int z1, i calc_voxel_transp(smd, pixel, tRay); else calc_voxel_transp_big(smd, pixel, tRay); - if(tRay < 0) + if(*tRay < 0.0f) return; if (err_1 > 0) { pixel[1] += y_inc; diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index a5028973e4b..c1b24375b3d 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -99,7 +99,7 @@ /* ************* XXX *************** */ static int okee() {return 0;} -static void BIF_undo_push() {} +static void BIF_undo_push(const char *msg) {} /* ************* XXX *************** */ /* **************** tools on Editmode Armature **************** */ diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index a1ce256a1af..1d87ca8a6df 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -466,12 +466,12 @@ static void renameTemplateBone(char *name, char *template_name, ListBase *editbo { if (template_name[i+1] == 'S' || template_name[i+1] == 's') { - j += sprintf(name + j, side_string); + j += sprintf(name + j, "%s", side_string); i++; } else if (template_name[i+1] == 'N' || template_name[i+1] == 'n') { - j += sprintf(name + j, num_string); + j += sprintf(name + j, "%s", num_string); i++; } else diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index 8807b21e653..1b167518a5a 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -65,7 +65,7 @@ /* ************* XXX *************** */ -static void waitcursor() {} +static void waitcursor(int val) {} static void progress_bar() {} static void start_progress_bar() {} static void end_progress_bar() {} diff --git a/source/blender/editors/include/ED_previewrender.h b/source/blender/editors/include/ED_previewrender.h index 0e50ea896d6..41cbecb5353 100644 --- a/source/blender/editors/include/ED_previewrender.h +++ b/source/blender/editors/include/ED_previewrender.h @@ -71,7 +71,7 @@ void ED_preview_init_dbase(void); void ED_preview_free_dbase(void); void ED_preview_shader_job(const struct bContext *C, void *owner, struct ID *id, struct ID *parent, int sizex, int sizey); -void ED_preview_iconrender(struct Scene *scene, struct ID *id, int *rect, int sizex, int sizey); +void ED_preview_iconrender(struct Scene *scene, struct ID *id, unsigned int *rect, int sizex, int sizey); void ED_preview_draw(const struct bContext *C, void *idp, void *parentp, rcti *rect); diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c index 5fc2ce46792..86910706540 100644 --- a/source/blender/editors/mesh/editmesh_mods.c +++ b/source/blender/editors/mesh/editmesh_mods.c @@ -92,7 +92,7 @@ editmesh_mods.c, UI level access, no geometry changes #include "BLO_sys_types.h" // for intptr_t support /* XXX */ -static void waitcursor() {} +static void waitcursor(int val) {} static int pupmenu() {return 0;} /* ****************************** MIRROR **************** */ diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 93e91732b2b..d29a4e21913 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -94,7 +94,7 @@ editmesh_tool.c: UI called tools for editmesh, geometry changes here, otherwise /* XXX */ static int extern_qread() {return 0;} -static void waitcursor() {} +static void waitcursor(int val) {} static int pupmenu() {return 0;} static int qtest() {return 0;} #define add_numbut(a, b, c, d, e, f, g) {} diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index c10fdbcfd8f..5d4be254593 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -96,7 +96,7 @@ #include "mesh_intern.h" /* XXX */ -static void waitcursor() {} +static void waitcursor(int val) {} static void error() {} static int pupmenu() {return 0;} /* XXX */ diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 5fd5f4ff0ad..e470689f28c 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -138,10 +138,10 @@ /* ************* XXX **************** */ static void error() {} -static void waitcursor() {} -static int pupmenu() {return 0;} -static int pupmenu_col() {return 0;} -static int okee() {return 0;} +static void waitcursor(int val) {} +static int pupmenu(const char *msg) {return 0;} +static int pupmenu_col(const char *msg, int val) {return 0;} +static int okee(const char *msg) {return 0;} /* port over here */ static bContext *C; diff --git a/source/blender/editors/physics/ed_fluidsim.c b/source/blender/editors/physics/ed_fluidsim.c index a8862eb17de..907d3f99f77 100644 --- a/source/blender/editors/physics/ed_fluidsim.c +++ b/source/blender/editors/physics/ed_fluidsim.c @@ -100,7 +100,7 @@ /* from header info.c */ static int start_progress_bar(void) {return 0;}; static void end_progress_bar(void) {}; -static void waitcursor() {}; +static void waitcursor(int val) {}; static int progress_bar(float done, char *busy_info) {return 0;} static int pupmenu() {return 0;} /* XXX */ diff --git a/source/blender/editors/preview/previewrender.c b/source/blender/editors/preview/previewrender.c index b542b362ae0..c5a741b11ed 100644 --- a/source/blender/editors/preview/previewrender.c +++ b/source/blender/editors/preview/previewrender.c @@ -892,7 +892,7 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs /* handle results */ if(sp->pr_method==PR_ICON_RENDER) { if(sp->pr_rect) - RE_ResultGet32(re, sp->pr_rect); + RE_ResultGet32(re, (unsigned int *)sp->pr_rect); } else { /* validate owner */ @@ -963,7 +963,7 @@ void ED_preview_shader_job(const bContext *C, void *owner, ID *id, ID *parent, i } /* rect should be allocated, sizex/sizy pixels, 32 bits */ -void ED_preview_iconrender(Scene *scene, ID *id, int *rect, int sizex, int sizey) +void ED_preview_iconrender(Scene *scene, ID *id, unsigned int *rect, int sizex, int sizey) { ShaderPreview *sp; short stop=0, do_update=0; @@ -975,7 +975,7 @@ void ED_preview_iconrender(Scene *scene, ID *id, int *rect, int sizex, int sizey sp->sizex= sizex; sp->sizey= sizey; sp->pr_method= PR_ICON_RENDER; - sp->pr_rect= rect; + sp->pr_rect= (int *)rect; /* shouldnt pr_rect be unsigned int also? - Campbell */ sp->id = id; shader_preview_startjob(sp, &stop, &do_update); diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c index d69c6dfcdba..2ae2712d02d 100644 --- a/source/blender/editors/screen/screendump.c +++ b/source/blender/editors/screen/screendump.c @@ -242,7 +242,7 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update) if(sj->dumprect) { if(mh) { - mh->append_movie(&rd, cfra, sj->dumprect, sj->dumpsx, sj->dumpsy); + mh->append_movie(&rd, cfra, (int *)sj->dumprect, sj->dumpsx, sj->dumpsy); printf("Append frame %d\n", cfra); } else { diff --git a/source/blender/editors/space_file/writeimage.c b/source/blender/editors/space_file/writeimage.c index ac15ed93ad0..994f38320f2 100644 --- a/source/blender/editors/space_file/writeimage.c +++ b/source/blender/editors/space_file/writeimage.c @@ -53,7 +53,7 @@ /* XXX */ static void error() {} -static void waitcursor() {} +static void waitcursor(int val) {} static void activate_fileselect() {} static int saveover() {return 0;} /* XXX */ diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 868897b76ac..5c82ff08094 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -95,7 +95,7 @@ //static int _last_seq_init=0; /* XXX */ static void error() {} -static void waitcursor() {} +static void waitcursor(int val) {} static void activate_fileselect() {} static int pupmenu() {return 0;} static int okee() {return 0;} diff --git a/source/blender/editors/space_text/text_python.c b/source/blender/editors/space_text/text_python.c index b606f8cb141..4400747a731 100644 --- a/source/blender/editors/space_text/text_python.c +++ b/source/blender/editors/space_text/text_python.c @@ -353,7 +353,7 @@ short do_texttools(SpaceText *st, char ascii, unsigned short evnt, short val) } if(draw) - ; // XXX redraw_alltext(); + {}; // XXX redraw_alltext(); return swallow; } @@ -536,7 +536,7 @@ short do_textmarkers(SpaceText *st, char ascii, unsigned short evnt, short val) } if(draw) - ; // XXX redraw_alltext(); + {}; // XXX redraw_alltext(); return swallow; } diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index e9a46cc7d7f..5192e2df611 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -37,6 +37,7 @@ #include "DNA_scene_types.h" #include "BKE_bmesh.h" /* For BevelModifierData */ +#include "BKE_smoke.h" /* For smokeModifier_free & smokeModifier_createType */ #include "WM_types.h" diff --git a/source/blender/python/generic/bpy_internal_import.c b/source/blender/python/generic/bpy_internal_import.c index 733576146b7..073cb58f1c8 100644 --- a/source/blender/python/generic/bpy_internal_import.c +++ b/source/blender/python/generic/bpy_internal_import.c @@ -111,8 +111,8 @@ PyObject *bpy_text_import( char *name, int *found ) PyObject *bpy_text_reimport( PyObject *module, int *found ) { Text *text; - char *txtname; - char *name; + const char *txtname; + const char *name; char *buf = NULL; //XXX Main *maggie= bpy_import_main ? bpy_import_main:G.main; Main *maggie= bpy_import_main; @@ -166,7 +166,7 @@ PyObject *bpy_text_reimport( PyObject *module, int *found ) } /* make into a module */ - return PyImport_ExecCodeModule( name, text->compiled ); + return PyImport_ExecCodeModule( (char *)name, text->compiled ); } @@ -273,8 +273,8 @@ static PyObject *blender_reload( PyObject * self, PyObject * args ) return newmodule; } -PyMethodDef bpy_import_meth[] = { {"bpy_import_meth", blender_import, METH_VARARGS | METH_KEYWORDS, "blenders import"} }; -PyMethodDef bpy_reload_meth[] = { {"bpy_reload_meth", blender_reload, METH_VARARGS, "blenders reload"} }; +PyMethodDef bpy_import_meth[] = { {"bpy_import_meth", (PyCFunction)blender_import, METH_VARARGS | METH_KEYWORDS, "blenders import"} }; +PyMethodDef bpy_reload_meth[] = { {"bpy_reload_meth", (PyCFunction)blender_reload, METH_VARARGS, "blenders reload"} }; /* Clear user modules. diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 4a84b1e78b6..83b55559a9a 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -2316,7 +2316,7 @@ static void do_render_all_options(Render *re) if((re->r.scemode & R_DOSEQ) && re->scene->ed && re->scene->ed->seqbase.first) { /* note: do_render_seq() frees rect32 when sequencer returns float images */ if(!re->test_break(re->tbh)) - ; //XXX do_render_seq(re->result, re->r.cfra); + {}; //XXX do_render_seq(re->result, re->r.cfra); re->stats_draw(re->sdh, &re->i); re->display_draw(re->ddh, re->result, NULL); |