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:
authorCampbell Barton <ideasman42@gmail.com>2012-08-09 01:20:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-09 01:20:10 +0400
commit0107385f7f846bb3f8ad97fed1fb13b8b9a4405e (patch)
tree8dd50830246be296ac16e8cab1d1c19268b8747e /source
parent5e0f254afa8caed1febbe02130cc313a53149efe (diff)
code cleanup: ensure macros require ';' endings
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_context.h2
-rw-r--r--source/blender/blenkernel/BKE_fcurve.h2
-rw-r--r--source/blender/blenkernel/intern/constraint.c2
-rw-r--r--source/blender/blenlib/BLI_array.h12
-rw-r--r--source/blender/blenlib/BLI_utildefines.h4
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h11
6 files changed, 17 insertions, 16 deletions
diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h
index 7a1172335d8..f5e073eb27a 100644
--- a/source/blender/blenkernel/BKE_context.h
+++ b/source/blender/blenkernel/BKE_context.h
@@ -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 *));
diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h
index f7aa4470c19..ad1a63fd1e6 100644
--- a/source/blender/blenkernel/BKE_fcurve.h
+++ b/source/blender/blenkernel/BKE_fcurve.h
@@ -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 \
- }
+}
/* ---------------------- */
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 8298023161b..e08c9e9d39e 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -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 */
diff --git a/source/blender/blenlib/BLI_array.h b/source/blender/blenlib/BLI_array.h
index 18258014529..32c2d5b9dc7 100644
--- a/source/blender/blenlib/BLI_array.h
+++ b/source/blender/blenlib/BLI_array.h
@@ -151,7 +151,7 @@
if (arr && (char *)arr != _##arr##_static) { \
BLI_array_fake_user(arr); \
MEM_freeN(arr); \
- }
+ } (void)0
#define BLI_array_pop(arr) ( \
(arr && _##arr##_count) ? \
@@ -162,12 +162,12 @@
/* 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) \
@@ -187,5 +187,7 @@
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
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index 536236c07ac..78d54defafd 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -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; \
@@ -185,7 +185,7 @@
} \
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)
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 7f52956d1e0..01b189c2260 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -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)