forked from bartvdbraak/blender
fix for warnings and implicit declarations
also fixed smoke comparing a float's mem-location rather then its value.
This commit is contained in:
parent
c371f49d9a
commit
2a727083c9
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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 ******** */
|
||||
|
@ -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;
|
||||
|
@ -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 **************** */
|
||||
|
@ -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
|
||||
|
@ -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() {}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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 **************** */
|
||||
|
@ -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) {}
|
||||
|
@ -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 */
|
||||
|
@ -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;
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
|
@ -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 {
|
||||
|
@ -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 */
|
||||
|
@ -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;}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user