Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2008-03-07 06:24:23 +0300
committerJoshua Leung <aligorith@gmail.com>2008-03-07 06:24:23 +0300
commitb4e13ae575b886d245c4953150cd23edbf91c4ba (patch)
tree48ed9cbca2f4006ff9412294b3fc37f475b4067f /source
parent5ea3956e4e6398fe27a4ce7d6b1c5a1a29134c40 (diff)
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.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/BME_eulers.c2
-rw-r--r--source/blender/blenkernel/intern/BME_mesh.c8
-rw-r--r--source/blender/blenkernel/intern/BME_tools.c2
-rw-r--r--source/blender/blenkernel/intern/cloth.c1
-rw-r--r--source/blender/blenloader/intern/readfile.c11
-rw-r--r--source/blender/include/BIF_imasel.h1
-rw-r--r--source/blender/makesdna/DNA_space_types.h2
-rw-r--r--source/blender/python/BPY_interface.c6
-rw-r--r--source/blender/src/drawscript.c4
9 files changed, 17 insertions, 20 deletions
diff --git a/source/blender/blenkernel/intern/BME_eulers.c b/source/blender/blenkernel/intern/BME_eulers.c
index ef2782773a1..7de0d8b49cf 100644
--- a/source/blender/blenkernel/intern/BME_eulers.c
+++ b/source/blender/blenkernel/intern/BME_eulers.c
@@ -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;
-} \ No newline at end of file
+}
diff --git a/source/blender/blenkernel/intern/BME_mesh.c b/source/blender/blenkernel/intern/BME_mesh.c
index dfd86f8af8b..b6049f8c0a7 100644
--- a/source/blender/blenkernel/intern/BME_mesh.c
+++ b/source/blender/blenkernel/intern/BME_mesh.c
@@ -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;
diff --git a/source/blender/blenkernel/intern/BME_tools.c b/source/blender/blenkernel/intern/BME_tools.c
index 664d4033a4c..65c113797eb 100644
--- a/source/blender/blenkernel/intern/BME_tools.c
+++ b/source/blender/blenkernel/intern/BME_tools.c
@@ -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");
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index f312a331975..b0f8cc9c330 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -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 )
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index a48ca83c381..532e16b7489 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -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) {
diff --git a/source/blender/include/BIF_imasel.h b/source/blender/include/BIF_imasel.h
index 0e92abe14e4..fb332022ba4 100644
--- a/source/blender/include/BIF_imasel.h
+++ b/source/blender/include/BIF_imasel.h
@@ -34,6 +34,7 @@
struct SpaceImaSel;
struct ScrArea;
+struct ID;
void free_imasel(struct SpaceImaSel *simasel);
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 213ccee7e29..dc5c73143aa 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -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
diff --git a/source/blender/python/BPY_interface.c b/source/blender/python/BPY_interface.c
index d4d91e1a19a..febf5e3ff31 100644
--- a/source/blender/python/BPY_interface.c
+++ b/source/blender/python/BPY_interface.c
@@ -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)
}
-} \ No newline at end of file
+}
diff --git a/source/blender/src/drawscript.c b/source/blender/src/drawscript.c
index 70ae4b1c94d..b6ea63ca695 100644
--- a/source/blender/src/drawscript.c
+++ b/source/blender/src/drawscript.c
@@ -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 )