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/radiosity | |
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/radiosity')
-rw-r--r-- | source/blender/radiosity/intern/source/radfactors.c | 12 | ||||
-rw-r--r-- | source/blender/radiosity/intern/source/radnode.c | 16 | ||||
-rw-r--r-- | source/blender/radiosity/intern/source/radpreprocess.c | 2 |
3 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/radiosity/intern/source/radfactors.c b/source/blender/radiosity/intern/source/radfactors.c index 8c89e806034..ba4dbf1b793 100644 --- a/source/blender/radiosity/intern/source/radfactors.c +++ b/source/blender/radiosity/intern/source/radfactors.c @@ -53,9 +53,9 @@ #include "RE_render_ext.h" /* for `RE_zbufferall_radio and RE_zbufferall_radio */ /* locals */ -void rad_setmatrices(RadView *vw); -void clearsubflagelem(RNode *rn); -void setsubflagelem(RNode *rn); +static void rad_setmatrices(RadView *vw); +static void clearsubflagelem(RNode *rn); +static void setsubflagelem(RNode *rn); RadView hemitop, hemiside; @@ -254,7 +254,7 @@ void rad_make_hocos(RadView *vw) /* } */ } -void rad_setmatrices(RadView *vw) /* for hemi's */ +static void rad_setmatrices(RadView *vw) /* for hemi's */ { float up1[3], len, twist; @@ -628,7 +628,7 @@ void minmaxradelemfilt(RNode *rn, float *min, float *max, float *errmin, float * } } -void setsubflagelem(RNode *rn) +static void setsubflagelem(RNode *rn) { if(rn->down1) { @@ -640,7 +640,7 @@ void setsubflagelem(RNode *rn) } } -void clearsubflagelem(RNode *rn) +static void clearsubflagelem(RNode *rn) { if(rn->down1) { diff --git a/source/blender/radiosity/intern/source/radnode.c b/source/blender/radiosity/intern/source/radnode.c index 042fe6840fc..ae246476e6d 100644 --- a/source/blender/radiosity/intern/source/radnode.c +++ b/source/blender/radiosity/intern/source/radnode.c @@ -57,10 +57,10 @@ #endif /* locals */ -void *malloc_fast(int size); -void *calloc_fast(int size); -void free_fast(void *poin, int siz); -void deleteTriNodes(RNode *node); +static void *malloc_fast(int size); +static void *calloc_fast(int size); +static void free_fast(void *poin, int siz); +static void deleteTriNodes(RNode *node); /* lower because of local type define */ /* void check_mallocgroup(MallocGroup *mg); */ @@ -122,7 +122,7 @@ void check_mallocgroup(MallocGroup *mg) printf("fastmalloc: shouldnt be here\n"); } -void *malloc_fast(int size) +static void *malloc_fast(int size) { MallocGroup *mg; void *retval; @@ -156,7 +156,7 @@ void *malloc_fast(int size) return mg->data; } -void *calloc_fast(int size) +static void *calloc_fast(int size) { void *poin; @@ -166,7 +166,7 @@ void *calloc_fast(int size) return poin; } -void free_fast(void *poin, int size) +static void free_fast(void *poin, int size) { MallocGroup *mg; intptr_t val; @@ -958,7 +958,7 @@ int comparelevel(RNode *node, RNode *nb, int level) return 1; } -void deleteTriNodes(RNode *node) /* both children of node */ +static void deleteTriNodes(RNode *node) /* both children of node */ { RNode *n1, *n2; diff --git a/source/blender/radiosity/intern/source/radpreprocess.c b/source/blender/radiosity/intern/source/radpreprocess.c index 07b933b6db9..694cb261b08 100644 --- a/source/blender/radiosity/intern/source/radpreprocess.c +++ b/source/blender/radiosity/intern/source/radpreprocess.c @@ -289,7 +289,7 @@ void setedgepointers() MEM_freeN(esblock); } -int materialIndex(Material *ma) +static int materialIndex(Material *ma) { int i = 0; for(i=0;i< RG.totmat; i++) |