quiet some clang warnings.
authorCampbell Barton <ideasman42@gmail.com>
Sat, 12 Feb 2011 05:12:26 +0000 (05:12 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 12 Feb 2011 05:12:26 +0000 (05:12 +0000)
intern/smoke/intern/FLUID_3D.cpp
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenlib/intern/path_util.c
source/blender/makesdna/intern/makesdna.c

index 05fbb91..27218d2 100644 (file)
@@ -605,7 +605,7 @@ void FLUID_3D::copyBorderAll(float* field, int zBegin, int zEnd)
        int zSize = zEnd-zBegin;
        int _blockTotalCells=_slabSize * zSize;
 
        int zSize = zEnd-zBegin;
        int _blockTotalCells=_slabSize * zSize;
 
-       if ((zBegin==0))
+       if (zBegin==0)
        for (int y = 0; y < _yRes; y++)
                for (int x = 0; x < _xRes; x++)
                {
        for (int y = 0; y < _yRes; y++)
                for (int x = 0; x < _xRes; x++)
                {
@@ -723,7 +723,7 @@ void FLUID_3D::wipeBoundariesSL(int zBegin, int zEnd)
        const int totalCells = _xRes * _yRes * _zRes;
 
        index = 0;
        const int totalCells = _xRes * _yRes * _zRes;
 
        index = 0;
-       if ((zBegin == 0))
+       if (zBegin == 0)
        for (y = 0; y < _yRes; y++)
                for (x = 0; x < _xRes; x++, index++)
                {
        for (y = 0; y < _yRes; y++)
                for (x = 0; x < _xRes; x++, index++)
                {
index 61fafa6..6db4e0a 100644 (file)
@@ -1079,7 +1079,7 @@ void graph_bfs(void)
                        minheight = pos[node->BFS_dist];
                        itA = node->child;
                        while(itA != NULL) {
                        minheight = pos[node->BFS_dist];
                        itA = node->child;
                        while(itA != NULL) {
-                               if((itA->node->color == DAG_WHITE) ) {
+                               if(itA->node->color == DAG_WHITE) {
                                        itA->node->color = DAG_GRAY;
                                        itA->node->BFS_dist = node->BFS_dist + 1;
                                        itA->node->k = (float) minheight;
                                        itA->node->color = DAG_GRAY;
                                        itA->node->BFS_dist = node->BFS_dist + 1;
                                        itA->node->k = (float) minheight;
@@ -1226,7 +1226,7 @@ DagNodeQueue * graph_dfs(void)
 
                        itA = node->child;
                        while(itA != NULL) {
 
                        itA = node->child;
                        while(itA != NULL) {
-                               if((itA->node->color == DAG_WHITE) ) {
+                               if(itA->node->color == DAG_WHITE) {
                                        itA->node->DFS_dvtm = time;
                                        itA->node->color = DAG_GRAY;
 
                                        itA->node->DFS_dvtm = time;
                                        itA->node->color = DAG_GRAY;
 
@@ -1480,7 +1480,7 @@ struct DagNodeQueue *get_all_childs(struct DagForest      *dag, void *ob)
                                        
                        itA = node->child;
                        while(itA != NULL) {
                                        
                        itA = node->child;
                        while(itA != NULL) {
-                               if((itA->node->color == DAG_WHITE) ) {
+                               if(itA->node->color == DAG_WHITE) {
                                        itA->node->DFS_dvtm = time;
                                        itA->node->color = DAG_GRAY;
                                        
                                        itA->node->DFS_dvtm = time;
                                        itA->node->color = DAG_GRAY;
                                        
@@ -1514,7 +1514,7 @@ short     are_obs_related(struct DagForest        *dag, void *ob1, void *ob2) {
        
        itA = node->child;
        while(itA != NULL) {
        
        itA = node->child;
        while(itA != NULL) {
-               if((itA->node->ob == ob2) ) {
+               if(itA->node->ob == ob2) {
                        return itA->node->type;
                } 
                itA = itA->next;
                        return itA->node->type;
                } 
                itA = itA->next;
@@ -1686,7 +1686,7 @@ void DAG_scene_sort(Main *bmain, Scene *sce)
                
                itA = node->child;
                while(itA != NULL) {
                
                itA = node->child;
                while(itA != NULL) {
-                       if((itA->node->color == DAG_WHITE) ) {
+                       if(itA->node->color == DAG_WHITE) {
                                itA->node->DFS_dvtm = time;
                                itA->node->color = DAG_GRAY;
                                
                                itA->node->DFS_dvtm = time;
                                itA->node->color = DAG_GRAY;
                                
@@ -2622,7 +2622,7 @@ void DAG_pose_sort(Object *ob)
                
                itA = node->child;
                while(itA != NULL) {
                
                itA = node->child;
                while(itA != NULL) {
-                       if((itA->node->color == DAG_WHITE) ) {
+                       if(itA->node->color == DAG_WHITE) {
                                itA->node->color = DAG_GRAY;
                                push_stack(nqueue,itA->node);
                                skip = 1;
                                itA->node->color = DAG_GRAY;
                                push_stack(nqueue,itA->node);
                                skip = 1;
index 3d69f51..37d1e65 100644 (file)
@@ -1262,7 +1262,7 @@ int BKE_write_ibuf(Scene *scene, ImBuf *ibuf, const char *name, int imtype, int
                ibuf->ftype= IMAGIC;
        }
 #ifdef WITH_HDR
                ibuf->ftype= IMAGIC;
        }
 #ifdef WITH_HDR
-       else if ((imtype==R_RADHDR)) {
+       else if (imtype==R_RADHDR) {
                ibuf->ftype= RADHDR;
        }
 #endif
                ibuf->ftype= RADHDR;
        }
 #endif
@@ -1274,11 +1274,11 @@ int BKE_write_ibuf(Scene *scene, ImBuf *ibuf, const char *name, int imtype, int
 
        }
 #ifdef WITH_DDS
 
        }
 #ifdef WITH_DDS
-       else if ((imtype==R_DDS)) {
+       else if (imtype==R_DDS) {
                ibuf->ftype= DDS;
        }
 #endif
                ibuf->ftype= DDS;
        }
 #endif
-       else if ((imtype==R_BMP)) {
+       else if (imtype==R_BMP) {
                ibuf->ftype= BMP;
        }
 #ifdef WITH_TIFF
                ibuf->ftype= BMP;
        }
 #ifdef WITH_TIFF
index 3ba18fe..3704792 100644 (file)
@@ -698,12 +698,12 @@ static void add_2nd_order_roller(Object *ob,float UNUSED(stiffness), int *counte
                        bs = sb->bspring + bp->springs[b-1];
                        /*nasty thing here that springs have two ends
                        so here we have to make sure we examine the other */
                        bs = sb->bspring + bp->springs[b-1];
                        /*nasty thing here that springs have two ends
                        so here we have to make sure we examine the other */
-                       if (( v0 == bs->v1) ){
+                       if (v0 == bs->v1){
                                bpo =sb->bpoint+bs->v2;
                                notthis = bs->v2;
                        }
                        else {
                                bpo =sb->bpoint+bs->v2;
                                notthis = bs->v2;
                        }
                        else {
-                       if (( v0 == bs->v2) ){
+                       if (v0 == bs->v2){
                                bpo =sb->bpoint+bs->v1;
                                notthis = bs->v1;
                        }
                                bpo =sb->bpoint+bs->v1;
                                notthis = bs->v1;
                        }
index aa5a775..5d68fbe 100644 (file)
@@ -459,7 +459,7 @@ void BLI_path_rel(char *file, const char *relfile)
                char *p= temp;
                char *q= file;
 
                char *p= temp;
                char *q= file;
 
-               while ((*p == *q)) {
+               while (*p == *q) {
                        ++p; ++q;
                        /* dont search beyond the end of the string
                         * in the rare case they match */
                        ++p; ++q;
                        /* dont search beyond the end of the string
                         * in the rare case they match */
index e66cfd4..7762ce1 100644 (file)
@@ -269,7 +269,7 @@ int add_name(char *str)
 
        additional_slen_offset = 0;
        
 
        additional_slen_offset = 0;
        
-       if((str[0]==0) /*  || (str[1]==0) */) return -1;
+       if(str[0]==0 /*  || (str[1]==0) */) return -1;
 
        if (str[0] == '(' && str[1] == '*') {
                /* we handle function pointer and special array cases here, e.g.
 
        if (str[0] == '(' && str[1] == '*') {
                /* we handle function pointer and special array cases here, e.g.
@@ -281,7 +281,6 @@ int add_name(char *str)
                if (debugSDNA > 3) printf("\t\t\t\t*** Function pointer or multidim array pointer found\n");
                /* functionpointer: transform the type (sometimes) */
                i = 0;
                if (debugSDNA > 3) printf("\t\t\t\t*** Function pointer or multidim array pointer found\n");
                /* functionpointer: transform the type (sometimes) */
                i = 0;
-               j = 0;
 
                while (str[i] != ')') {
                        buf[i] = str[i];
 
                while (str[i] != ')') {
                        buf[i] = str[i];