forked from bartvdbraak/blender
Another big purge of warnings. (Main culprits this time were Campbell and Geoffrey):
* no newline at end of file (2-3) * uninitialised vars (1) * unused vars (1-2) * assigning/comparing pointers and ints (numerous) * etc.
This commit is contained in:
parent
5ea3956e4e
commit
b4e13ae575
@ -972,4 +972,4 @@ BME_Poly *BME_JFKE(BME_Mesh *bm, BME_Poly *f1, BME_Poly *f2, BME_Edge *e)
|
||||
BME_free_loop(bm, f2loop);
|
||||
BME_free_poly(bm, f2);
|
||||
return f1;
|
||||
}
|
||||
}
|
||||
|
@ -153,8 +153,7 @@ int BME_model_begin(BME_Mesh *bm){
|
||||
}
|
||||
|
||||
void BME_model_end(BME_Mesh *bm){
|
||||
BME_Mesh *badmesh;
|
||||
int meshok,backupok, totvert, totedge, totpoly, totloop;
|
||||
int meshok, totvert, totedge, totpoly, totloop;
|
||||
|
||||
totvert = BLI_countlist(&(bm->verts));
|
||||
totedge = BLI_countlist(&(bm->edges));
|
||||
@ -166,7 +165,10 @@ void BME_model_end(BME_Mesh *bm){
|
||||
if(bm->lpar) MEM_freeN(bm->lpar);
|
||||
if(bm->plar) MEM_freeN(bm->plar);
|
||||
|
||||
bm->vtar = bm->edar = bm->lpar = bm->plar = NULL;
|
||||
bm->vtar = NULL;
|
||||
bm->edar = NULL;
|
||||
bm->lpar = NULL;
|
||||
bm->plar = NULL;
|
||||
bm->vtarlen = bm->edarlen = bm->lparlen = bm->plarlen = 1024;
|
||||
|
||||
|
||||
|
@ -1089,7 +1089,7 @@ static BME_Mesh *BME_bevel_mesh(BME_Mesh *bm, float value, int res, int options,
|
||||
}
|
||||
/* look for original edges, and remove them */
|
||||
oe = e;
|
||||
while (e = BME_disk_next_edgeflag(oe, v, 0, BME_BEVEL_ORIG | BME_BEVEL_BEVEL)) {
|
||||
while ( (e = BME_disk_next_edgeflag(oe, v, 0, BME_BEVEL_ORIG | BME_BEVEL_BEVEL)) ) {
|
||||
/* join the faces (we'll split them later) */
|
||||
f = BME_JFKE_safe(bm,e->loop->f,((BME_Loop*)e->loop->radial.next->data)->f,e);
|
||||
if (!f); //printf("Non-manifold geometry not getting tagged right?\n");
|
||||
|
@ -1027,7 +1027,6 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d
|
||||
float tnull[3] = {0,0,0};
|
||||
int cache_there = 0;
|
||||
Cloth *cloth = NULL;
|
||||
MFace *mfaces = NULL;
|
||||
|
||||
// If we have a clothObject, free it.
|
||||
if ( clmd->clothObject != NULL )
|
||||
|
@ -1425,12 +1425,7 @@ static void direct_link_brush(FileData *fd, Brush *brush)
|
||||
static void direct_link_script(FileData *fd, Script *script)
|
||||
{
|
||||
script->id.us = 1;
|
||||
script->py_draw =
|
||||
script->py_event =
|
||||
script->py_button =
|
||||
script->py_browsercallback =
|
||||
script->py_globaldict =
|
||||
script->flags = NULL;
|
||||
SCRIPT_SET_NULL(script)
|
||||
}
|
||||
|
||||
/* ************ READ CurveMapping *************** */
|
||||
@ -3742,7 +3737,7 @@ static void lib_link_screen(FileData *fd, Main *main)
|
||||
/*sc->script = NULL; - 2.45 set to null, better re-run the script */
|
||||
if (scpt->script) {
|
||||
scpt->script = newlibadr(fd, sc->id.lib, scpt->script);
|
||||
SCRIPT_SET_NULL(scpt->script);
|
||||
SCRIPT_SET_NULL(scpt->script)
|
||||
}
|
||||
}
|
||||
else if(sl->spacetype==SPACE_OOPS) {
|
||||
@ -3920,7 +3915,7 @@ void lib_link_screen_restore(Main *newmain, Scene *curscene)
|
||||
|
||||
/*sc->script = NULL; - 2.45 set to null, better re-run the script */
|
||||
if (scpt->script) {
|
||||
SCRIPT_SET_NULL(scpt->script);
|
||||
SCRIPT_SET_NULL(scpt->script)
|
||||
}
|
||||
}
|
||||
else if(sl->spacetype==SPACE_OOPS) {
|
||||
|
@ -34,6 +34,7 @@
|
||||
|
||||
struct SpaceImaSel;
|
||||
struct ScrArea;
|
||||
struct ID;
|
||||
|
||||
void free_imasel(struct SpaceImaSel *simasel);
|
||||
|
||||
|
@ -304,7 +304,7 @@ typedef struct Script {
|
||||
char scriptname[256]; /* store the script file here so we can re-run it on loading blender, if "Enable Scripts" is on */
|
||||
char scriptarg[256];
|
||||
} Script;
|
||||
#define SCRIPT_SET_NULL(_script) _script->py_draw = _script->py_event = _script->py_button = _script->py_browsercallback = _script->py_globaldict = _script->flags = 0;
|
||||
#define SCRIPT_SET_NULL(_script) _script->py_draw = _script->py_event = _script->py_button = _script->py_browsercallback = _script->py_globaldict = NULL; _script->flags = 0;
|
||||
#define SCRIPT_RUNNING 0x01
|
||||
#define SCRIPT_GUI 0x02
|
||||
#define SCRIPT_FILESEL 0x04
|
||||
|
@ -774,7 +774,7 @@ int BPY_run_script(Script *script)
|
||||
Text *text = NULL;
|
||||
BPy_constant *info;
|
||||
int len;
|
||||
char *buffer, *s;
|
||||
char *buffer=NULL, *s;
|
||||
|
||||
FILE *fp = NULL;
|
||||
|
||||
@ -2958,6 +2958,6 @@ void BPY_scripts_clear_pyobjects( void )
|
||||
Py_XDECREF((PyObject *)script->py_button);
|
||||
Py_XDECREF((PyObject *)script->py_browsercallback);
|
||||
Py_XDECREF((PyObject *)script->py_globaldict);
|
||||
SCRIPT_SET_NULL(script);
|
||||
SCRIPT_SET_NULL(script)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ void drawscriptspace(ScrArea *sa, void *spacedata)
|
||||
/* Is this script loaded from a file and it needs running??? */
|
||||
if ( (G.f & G_DOSCRIPTLINKS) &&
|
||||
script->scriptname[0] != '\0' &&
|
||||
(script->flags == NULL &&
|
||||
(script->flags == 0 &&
|
||||
script->py_event == NULL &&
|
||||
script->py_button == NULL &&
|
||||
script->py_draw == NULL )
|
||||
@ -130,7 +130,7 @@ void winqreadscriptspace(struct ScrArea *sa, void *spacedata, struct BWinEvent *
|
||||
/* Is this script loaded from a file and it needs running??? */
|
||||
if ( (G.f & G_DOSCRIPTLINKS) &&
|
||||
script->scriptname[0] != '\0' &&
|
||||
(script->flags == NULL &&
|
||||
(script->flags == 0 &&
|
||||
script->py_event == NULL &&
|
||||
script->py_button == NULL &&
|
||||
script->py_draw == NULL )
|
||||
|
Loading…
Reference in New Issue
Block a user