code cleanup: ensure macros require ';' endings
authorCampbell Barton <ideasman42@gmail.com>
Wed, 8 Aug 2012 21:20:10 +0000 (21:20 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 8 Aug 2012 21:20:10 +0000 (21:20 +0000)
source/blender/blenkernel/BKE_context.h
source/blender/blenkernel/BKE_fcurve.h
source/blender/blenkernel/intern/constraint.c
source/blender/blenlib/BLI_array.h
source/blender/blenlib/BLI_utildefines.h
source/blender/makesdna/DNA_userdef_types.h

index 7a1172335d8188fee5cb58864ad84eb3923687f0..f5e073eb27af4014ee80088839a25012c2b1874a 100644 (file)
@@ -221,7 +221,7 @@ void CTX_data_list_add(bContextDataResult *result, void *data);
 #define CTX_DATA_END                                                          \
                }                                                                     \
                BLI_freelistN(&ctx_data_list);                                        \
-       }
+} (void)0
 
 int ctx_data_list_count(const bContext *C, int (*func)(const bContext *, ListBase *));
 
index f7aa4470c1973ae66e1d89080a43e6a29484bbb8..ad1a63fd1e6d229ccdda37d7b416526ffc08ab91 100644 (file)
@@ -83,7 +83,7 @@ void bezt_add_to_cfra_elem(ListBase *lb, struct BezTriple *bezt);
                
 /* tidy up for driver targets loopers */
 #define DRIVER_TARGETS_LOOPER_END \
-       }
+}
 
 /* ---------------------- */
 
index 8298023161b8e946f2bd4795f418d70669200167..e08c9e9d39ec6fb02a44f67b52023976bd8e2efa 100644 (file)
@@ -3115,7 +3115,7 @@ static void clampto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *tar
                copy_m4_m4(obmat, cob->matrix);
                copy_v3_v3(ownLoc, obmat[3]);
                
-               INIT_MINMAX(curveMin, curveMax)
+               INIT_MINMAX(curveMin, curveMax);
                BKE_object_minmax(ct->tar, curveMin, curveMax);
                
                /* get targetmatrix */
index 182580145298a48cd2211d7981cc7383ce682f68..32c2d5b9dc7b8a268f78fea959869e54a1535565 100644 (file)
        if (arr && (char *)arr != _##arr##_static) {                              \
            BLI_array_fake_user(arr);                                             \
            MEM_freeN(arr);                                                       \
-       }
+       } (void)0
 
 #define BLI_array_pop(arr)  (                                                 \
        (arr && _##arr##_count) ?                                                 \
 /* resets the logical size of an array to zero, but doesn't
  * free the memory. */
 #define BLI_array_empty(arr)                                                  \
-       _##arr##_count = 0
+       _##arr##_count = 0; (void)0
 
 /* set the count of the array, doesn't actually increase the allocated array
  * size.  don't use this unless you know what you're doing. */
 #define BLI_array_length_set(arr, count)                                      \
-       _##arr##_count = (count)
+       _##arr##_count = (count); (void)0
 
 /* only to prevent unused warnings */
 #define BLI_array_fake_user(arr)                                              \
                MEM_mallocN(sizeof(*(arr)) * (realsize), allocstr)                \
            )                                                                     \
 
-#define BLI_array_fixedstack_free(arr)  \
-       if (_##arr##_is_static) MEM_freeN(arr)
+#define BLI_array_fixedstack_free(arr)                                        \
+       if (_##arr##_is_static) {                                                 \
+               MEM_freeN(arr);                                                       \
+       } (void)0
index 536236c07accc7d0bedda39729cb2632ee53e6ca..78d54defafda2ea3845cbd81d0c3aea89a70f8f9 100644 (file)
@@ -81,7 +81,7 @@
 #define INIT_MINMAX(min, max) {                                               \
                (min)[0] = (min)[1] = (min)[2] =  1.0e30f;                            \
                (max)[0] = (max)[1] = (max)[2] = -1.0e30f;                            \
-       }
+       } (void)0
 #define INIT_MINMAX2(min, max) {                                              \
                (min)[0] = (min)[1] = 1.0e30f;                                        \
                (max)[0] = (max)[1] = -1.0e30f;                                       \
        }                                                                         \
        else {                                                                    \
                CLAMP(a, c, b);                                                       \
-       } (void)
+       } (void)0
 
 #define IS_EQ(a, b) ((fabs((double)(a) - (b)) >= (double) FLT_EPSILON) ? 0 : 1)
 #define IS_EQF(a, b) ((fabsf((float)(a) - (b)) >= (float) FLT_EPSILON) ? 0 : 1)
index 7f52956d1e0191e36eb91ef9e4d4c411b369cea2..01b189c2260bd53fd3944643fe9773668ff481fc 100644 (file)
@@ -482,11 +482,10 @@ extern UserDef U; /* from blenkernel blender.c */
 #define USER_TOOLTIPS_PYTHON    (1 << 26)
 
 /* helper macro for checking frame clamping */
-#define FRAMENUMBER_MIN_CLAMP(cfra)                                           \
-       {                                                                         \
-               if ((U.flag & USER_NONEGFRAMES) && (cfra < 0))                        \
-                       cfra = 0;                                                         \
-       }
+#define FRAMENUMBER_MIN_CLAMP(cfra)  {                                        \
+       if ((U.flag & USER_NONEGFRAMES) && (cfra < 0))                            \
+               cfra = 0;                                                             \
+       } (void)0
 
 /* viewzom */
 #define USER_ZOOM_CONT                 0
@@ -521,7 +520,7 @@ extern UserDef U; /* from blenkernel blender.c */
 #define USER_MENUFIXEDORDER            (1 << 23)
 #define USER_CONTINUOUS_MOUSE  (1 << 24)
 #define USER_ZOOM_INVERT               (1 << 25)
-#define USER_ZOOM_HORIZ                (1 << 26) /* for CONTINUE and DOLLY zoom */
+#define USER_ZOOM_HORIZ                        (1 << 26) /* for CONTINUE and DOLLY zoom */
 #define USER_SPLASH_DISABLE            (1 << 27)
 #define USER_HIDE_RECENT               (1 << 28)
 #define USER_SHOW_THUMBNAILS   (1 << 29)