diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-09-29 21:08:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-09-29 21:08:11 +0400 |
commit | 2a331067cc52693aa903a0487be29c93298c4b8b (patch) | |
tree | 814fba88bc5af1de58ea6ef12958e38daa1b9fb4 /source/blender/blenloader | |
parent | 7ebeceb399002076106333202ec59483fc3ed4ba (diff) |
resolve some compiler warnings with intel c/c++ compiler
* subsurf code had a lot of unused variables, removed these where they are obviously not needed. commented if they could be useful later.
* some variables declorations hide existing variables (many of these left), but fixed some that could cause confusion.
* removed unused vars
* obscure python memory leak with colorband.
* make_sample_tables had a loop running wasnt used.
* if 0'd functions in arithb.c that are not used yet.
* made many functions static
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/BLO_soundfile.h | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 12 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 8 |
3 files changed, 10 insertions, 12 deletions
diff --git a/source/blender/blenloader/BLO_soundfile.h b/source/blender/blenloader/BLO_soundfile.h index 3d133b2d3bd..a239c7d8965 100644 --- a/source/blender/blenloader/BLO_soundfile.h +++ b/source/blender/blenloader/BLO_soundfile.h @@ -35,7 +35,5 @@ struct bSound; struct PackedFile; -//void sound_read_wav_data(bSound * sound, PackedFile * pf); - #endif diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 4ec773409da..5b4fd470e6e 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -1347,7 +1347,7 @@ static void test_pointer_array(FileData *fd, void **mat) void IDP_DirectLinkProperty(IDProperty *prop, int switch_endian, void *fd); void IDP_LibLinkProperty(IDProperty *prop, int switch_endian, void *fd); -void IDP_DirectLinkArray(IDProperty *prop, int switch_endian, void *fd) +static void IDP_DirectLinkArray(IDProperty *prop, int switch_endian, void *fd) { int i; @@ -1368,14 +1368,14 @@ void IDP_DirectLinkArray(IDProperty *prop, int switch_endian, void *fd) } } -void IDP_DirectLinkString(IDProperty *prop, int switch_endian, void *fd) +static void IDP_DirectLinkString(IDProperty *prop, int switch_endian, void *fd) { /*since we didn't save the extra string buffer, set totallen to len.*/ prop->totallen = prop->len; prop->data.pointer = newdataadr(fd, prop->data.pointer); } -void IDP_DirectLinkGroup(IDProperty *prop, int switch_endian, void *fd) +static void IDP_DirectLinkGroup(IDProperty *prop, int switch_endian, void *fd) { ListBase *lb = &prop->data.group; IDProperty *loop; @@ -4874,7 +4874,7 @@ static void ntree_version_245(FileData *fd, Library *lib, bNodeTree *ntree) } } -void idproperties_fix_groups_lengths_recurse(IDProperty *prop) +static void idproperties_fix_groups_lengths_recurse(IDProperty *prop) { IDProperty *loop; int i; @@ -4889,7 +4889,7 @@ void idproperties_fix_groups_lengths_recurse(IDProperty *prop) } } -void idproperties_fix_group_lengths(ListBase idlist) +static void idproperties_fix_group_lengths(ListBase idlist) { ID *id; @@ -4900,7 +4900,7 @@ void idproperties_fix_group_lengths(ListBase idlist) } } -void alphasort_version_246(FileData *fd, Library *lib, Mesh *me) +static void alphasort_version_246(FileData *fd, Library *lib, Mesh *me) { Material *ma; MFace *mf; diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 9ca9a3d9287..3c2ca92f3fc 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -399,7 +399,7 @@ static void writedata(WriteData *wd, int filecode, int len, void *adr) /* do not void IDP_WriteProperty_OnlyData(IDProperty *prop, void *wd); void IDP_WriteProperty(IDProperty *prop, void *wd); -void IDP_WriteArray(IDProperty *prop, void *wd) +static void IDP_WriteArray(IDProperty *prop, void *wd) { /*REMEMBER to set totalen to len in the linking code!!*/ if (prop->data.pointer) { @@ -407,13 +407,13 @@ void IDP_WriteArray(IDProperty *prop, void *wd) } } -void IDP_WriteString(IDProperty *prop, void *wd) +static void IDP_WriteString(IDProperty *prop, void *wd) { /*REMEMBER to set totalen to len in the linking code!!*/ writedata(wd, DATA, prop->len+1, prop->data.pointer); } -void IDP_WriteGroup(IDProperty *prop, void *wd) +static void IDP_WriteGroup(IDProperty *prop, void *wd) { IDProperty *loop; @@ -1066,7 +1066,7 @@ static void write_mballs(WriteData *wd, ListBase *idbase) } } -int amount_of_chars(char *str) +static int amount_of_chars(char *str) { // Since the data is saved as UTF-8 to the cu->str // The cu->len is not same as the strlen(cu->str) |