diff options
Diffstat (limited to 'source/blender')
28 files changed, 116 insertions, 115 deletions
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index 1b4ce59067d..6ab942f4e4d 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -132,7 +132,7 @@ static void blf_font_ensure_ascii_table(FontBLF *font) _g = blf_glyph_add(_font, \ FT_Get_Char_Index((_font)->face, _c), _c); \ } \ - } \ + } (void)0 #define BLF_KERNING_VARS(_font, _has_kerning, _kern_mode) \ @@ -155,7 +155,7 @@ static void blf_font_ensure_ascii_table(FontBLF *font) _pen_x += delta.x >> 6; \ } \ } \ -} \ +} (void)0 void blf_font_draw(FontBLF *font, const char *str, unsigned int len) { diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 805db8f5171..1358c2e34a8 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -744,7 +744,7 @@ void BKE_animdata_main_cb(Main *mainptr, ID_AnimData_Edit_Callback func, void *u for (id = first; id; id = id->next) { \ AnimData *adt = BKE_animdata_from_id(id); \ if (adt) func(id, adt, user_data); \ - } + } (void)0 /* "embedded" nodetree cases (i.e. scene/material/texture->nodetree) */ #define ANIMDATA_NODETREE_IDS_CB(first, NtId_Type) \ @@ -756,7 +756,7 @@ void BKE_animdata_main_cb(Main *mainptr, ID_AnimData_Edit_Callback func, void *u if (adt2) func(id, adt2, user_data); \ } \ if (adt) func(id, adt, user_data); \ - } + } (void)0 /* nodes */ ANIMDATA_IDS_CB(mainptr->nodetree.first); @@ -828,7 +828,7 @@ void BKE_all_animdata_fix_paths_rename(ID *ref_id, const char *prefix, const cha for (id = first; id; id = id->next) { \ AnimData *adt = BKE_animdata_from_id(id); \ BKE_animdata_fix_paths_rename(id, adt, ref_id, prefix, oldName, newName, 0, 0, 1); \ - } + } (void)0 /* another version of this macro for nodetrees */ #define RENAMEFIX_ANIM_NODETREE_IDS(first, NtId_Type) \ @@ -840,7 +840,7 @@ void BKE_all_animdata_fix_paths_rename(ID *ref_id, const char *prefix, const cha BKE_animdata_fix_paths_rename((ID *)ntp, adt2, ref_id, prefix, oldName, newName, 0, 0, 1); \ } \ BKE_animdata_fix_paths_rename(id, adt, ref_id, prefix, oldName, newName, 0, 0, 1); \ - } + } (void)0 /* nodes */ RENAMEFIX_ANIM_IDS(mainptr->nodetree.first); @@ -2266,7 +2266,8 @@ void BKE_animsys_evaluate_all_animation(Main *main, Scene *scene, float ctime) AnimData *adt = BKE_animdata_from_id(id); \ BKE_animsys_evaluate_animdata(scene, id, adt, ctime, aflag); \ } \ - } + } (void)0 + /* another macro for the "embedded" nodetree cases * - this is like EVAL_ANIM_IDS, but this handles the case "embedded nodetrees" * (i.e. scene/material/texture->nodetree) which we need a special exception @@ -2284,7 +2285,7 @@ void BKE_animsys_evaluate_all_animation(Main *main, Scene *scene, float ctime) } \ BKE_animsys_evaluate_animdata(scene, id, adt, ctime, aflag); \ } \ - } + } (void)0 /* optimization: * when there are no actions, don't go over database and loop over heaps of datablocks, diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index da9350cc7b9..c6a0ecc057a 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -701,7 +701,7 @@ static void default_get_tarmat(bConstraint *con, bConstraintOb *UNUSED(cob), bCo } \ \ BLI_addtail(list, ct); \ - } + } (void)0 /* This following macro should be used for all standard single-target *_get_tars functions * to save typing and reduce maintenance woes. It does not do the subtarget related operations @@ -720,7 +720,7 @@ static void default_get_tarmat(bConstraint *con, bConstraintOb *UNUSED(cob), bCo if (ct->tar) ct->type = CONSTRAINT_OBTYPE_OBJECT; \ \ BLI_addtail(list, ct); \ - } + } (void)0 /* This following macro should be used for all standard single-target *_flush_tars functions * to save typing and reduce maintenance woes. @@ -741,7 +741,7 @@ static void default_get_tarmat(bConstraint *con, bConstraintOb *UNUSED(cob), bCo BLI_freelinkN(list, ct); \ ct = ctn; \ } \ - } + } (void)0 /* This following macro should be used for all standard single-target *_flush_tars functions * to save typing and reduce maintenance woes. It does not do the subtarget related operations. @@ -761,7 +761,7 @@ static void default_get_tarmat(bConstraint *con, bConstraintOb *UNUSED(cob), bCo BLI_freelinkN(list, ct); \ ct = ctn; \ } \ - } + } (void)0 /* --------- ChildOf Constraint ------------ */ @@ -790,7 +790,7 @@ static int childof_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -805,7 +805,7 @@ static void childof_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -925,7 +925,7 @@ static int trackto_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -940,7 +940,7 @@ static void trackto_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -1108,8 +1108,8 @@ static int kinematic_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints is used twice here */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) - SINGLETARGET_GET_TARS(con, data->poletar, data->polesubtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); + SINGLETARGET_GET_TARS(con, data->poletar, data->polesubtarget, ct, list); return 2; } @@ -1124,8 +1124,8 @@ static void kinematic_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) - SINGLETARGET_FLUSH_TARS(con, data->poletar, data->polesubtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); + SINGLETARGET_FLUSH_TARS(con, data->poletar, data->polesubtarget, ct, list, nocopy); } } @@ -1197,7 +1197,7 @@ static int followpath_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints without subtargets */ - SINGLETARGETNS_GET_TARS(con, data->tar, ct, list) + SINGLETARGETNS_GET_TARS(con, data->tar, ct, list); return 1; } @@ -1212,7 +1212,7 @@ static void followpath_flush_tars(bConstraint *con, ListBase *list, short nocopy bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGETNS_FLUSH_TARS(con, data->tar, ct, list, nocopy) + SINGLETARGETNS_FLUSH_TARS(con, data->tar, ct, list, nocopy); } } @@ -1543,7 +1543,7 @@ static int loclike_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -1558,7 +1558,7 @@ static void loclike_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -1633,7 +1633,7 @@ static int rotlike_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -1648,7 +1648,7 @@ static void rotlike_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -1745,7 +1745,7 @@ static int sizelike_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -1760,7 +1760,7 @@ static void sizelike_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -1834,7 +1834,7 @@ static int translike_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -1849,7 +1849,7 @@ static void translike_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -2093,7 +2093,7 @@ static int actcon_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -2108,7 +2108,7 @@ static void actcon_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -2255,7 +2255,7 @@ static int locktrack_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -2270,7 +2270,7 @@ static void locktrack_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -2565,7 +2565,7 @@ static int distlimit_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -2580,7 +2580,7 @@ static void distlimit_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -2692,7 +2692,7 @@ static int stretchto_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -2707,7 +2707,7 @@ static void stretchto_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -2866,7 +2866,7 @@ static int minmax_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -2881,7 +2881,7 @@ static void minmax_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -3009,7 +3009,7 @@ static int rbj_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints without subtargets */ - SINGLETARGETNS_GET_TARS(con, data->tar, ct, list) + SINGLETARGETNS_GET_TARS(con, data->tar, ct, list); return 1; } @@ -3024,7 +3024,7 @@ static void rbj_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGETNS_FLUSH_TARS(con, data->tar, ct, list, nocopy) + SINGLETARGETNS_FLUSH_TARS(con, data->tar, ct, list, nocopy); } } @@ -3060,7 +3060,7 @@ static int clampto_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints without subtargets */ - SINGLETARGETNS_GET_TARS(con, data->tar, ct, list) + SINGLETARGETNS_GET_TARS(con, data->tar, ct, list); return 1; } @@ -3075,7 +3075,7 @@ static void clampto_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGETNS_FLUSH_TARS(con, data->tar, ct, list, nocopy) + SINGLETARGETNS_FLUSH_TARS(con, data->tar, ct, list, nocopy); } } @@ -3244,7 +3244,7 @@ static int transform_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -3259,7 +3259,7 @@ static void transform_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -3380,7 +3380,7 @@ static int shrinkwrap_get_tars(bConstraint *con, ListBase *list) bShrinkwrapConstraint *data = con->data; bConstraintTarget *ct; - SINGLETARGETNS_GET_TARS(con, data->target, ct, list) + SINGLETARGETNS_GET_TARS(con, data->target, ct, list); return 1; } @@ -3395,7 +3395,7 @@ static void shrinkwrap_flush_tars(bConstraint *con, ListBase *list, short nocopy bShrinkwrapConstraint *data = con->data; bConstraintTarget *ct = list->first; - SINGLETARGETNS_FLUSH_TARS(con, data->target, ct, list, nocopy) + SINGLETARGETNS_FLUSH_TARS(con, data->target, ct, list, nocopy); } } @@ -3545,7 +3545,7 @@ static int damptrack_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -3560,7 +3560,7 @@ static void damptrack_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -3690,7 +3690,7 @@ static int splineik_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints without subtargets */ - SINGLETARGETNS_GET_TARS(con, data->tar, ct, list) + SINGLETARGETNS_GET_TARS(con, data->tar, ct, list); return 1; } @@ -3705,7 +3705,7 @@ static void splineik_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGETNS_FLUSH_TARS(con, data->tar, ct, list, nocopy) + SINGLETARGETNS_FLUSH_TARS(con, data->tar, ct, list, nocopy); } } @@ -3762,7 +3762,7 @@ static int pivotcon_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -3777,7 +3777,7 @@ static void pivotcon_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 1077b5ad7c3..9737888e0b2 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -162,14 +162,14 @@ static AdrBit2Path ma_mode_bits[] = { static AdrBit2Path *adrcode_bitmaps_to_paths(int blocktype, int adrcode, int *tot) { /* Object layers */ - if ((blocktype == ID_OB) && (adrcode == OB_LAY)) + if ((blocktype == ID_OB) && (adrcode == OB_LAY)) RET_ABP(ob_layer_bits) - else if ((blocktype == ID_MA) && (adrcode == MA_MODE)) - RET_ABP(ma_mode_bits) - // XXX TODO: add other types... + else if ((blocktype == ID_MA) && (adrcode == MA_MODE)) + RET_ABP(ma_mode_bits) + // XXX TODO: add other types... - /* Normal curve */ - return NULL; + /* Normal curve */ + return NULL; } /* *************************************************** */ diff --git a/source/blender/blenlib/intern/BLI_heap.c b/source/blender/blenlib/intern/BLI_heap.c index 0a281786100..c1175192434 100644 --- a/source/blender/blenlib/intern/BLI_heap.c +++ b/source/blender/blenlib/intern/BLI_heap.c @@ -63,7 +63,7 @@ struct Heap { { \ SWAP(int, heap->tree[i]->index, heap->tree[j]->index); \ SWAP(HeapNode *, heap->tree[i], heap->tree[j]); \ - } + } (void)0 /***/ diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index e9ee91505de..6a4ee64ebcd 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -139,7 +139,7 @@ static float KDOP_AXES[13][3] = { else break; \ } \ heap[child] = element; \ - } + } (void)0 #define POP_HEAP_BODY(HEAP_TYPE, PRIORITY, heap, heap_size) \ { \ @@ -158,7 +158,7 @@ static float KDOP_AXES[13][3] = { parent = child2; \ } \ heap[parent] = element; \ - } + } (void)0 #if 0 static int ADJUST_MEMORY(void *local_memblock, void **memblock, int new_size, int *max_size, int size_per_item) diff --git a/source/blender/blenlib/intern/bpath.c b/source/blender/blenlib/intern/bpath.c index 1aba8bbeaf2..f90bb4d6152 100644 --- a/source/blender/blenlib/intern/bpath.c +++ b/source/blender/blenlib/intern/bpath.c @@ -417,7 +417,7 @@ void BLI_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int bpath_user_data); \ } \ } \ - } \ + } (void)0 { diff --git a/source/blender/blenlib/intern/edgehash.c b/source/blender/blenlib/intern/edgehash.c index cdaf270adcb..d58ccbbd48e 100644 --- a/source/blender/blenlib/intern/edgehash.c +++ b/source/blender/blenlib/intern/edgehash.c @@ -56,7 +56,7 @@ static unsigned int _ehash_hashsizes[] = { v0 ^= v1; \ v1 ^= v0; \ v0 ^= v1; \ - } + } (void)0 /***/ diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c index e01d2061743..2ff0b564592 100644 --- a/source/blender/blenlib/intern/noise.c +++ b/source/blender/blenlib/intern/noise.c @@ -992,7 +992,7 @@ static float g[512 + 2][3] = { b1 = (b0 + 1) & 255; \ r0 = t - floorf(t); \ r1 = r0 - 1.0f; \ - } + } (void)0 static float noise3_perlin(float vec[3]) diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c index 77bebfaf2e8..e9bccd4244b 100644 --- a/source/blender/blenlib/intern/string_utf8.c +++ b/source/blender/blenlib/intern/string_utf8.c @@ -178,14 +178,14 @@ static const size_t utf8_skip_data[256] = { } \ } \ *dst= '\0'; \ - } + } (void)0 char *BLI_strncpy_utf8(char *dst, const char *src, size_t maxncpy) { char *dst_r= dst; /* note: currently we don't attempt to deal with invalid utf8 chars */ - BLI_STR_UTF8_CPY(dst, src, maxncpy) + BLI_STR_UTF8_CPY(dst, src, maxncpy); return dst_r; } @@ -197,7 +197,7 @@ char *BLI_strncat_utf8(char *dst, const char *src, size_t maxncpy) maxncpy--; } - BLI_STR_UTF8_CPY(dst, src, maxncpy) + BLI_STR_UTF8_CPY(dst, src, maxncpy); return dst; } @@ -315,7 +315,7 @@ size_t BLI_strncpy_wchar_from_utf8(wchar_t *dst_w, const char *src_c, const size } \ else { \ Len = -1; \ - } + } (void)0 /* same as glib define but added an 'Err' arg */ #define UTF8_GET(Result, Chars, Count, Mask, Len, Err) \ @@ -327,7 +327,7 @@ size_t BLI_strncpy_wchar_from_utf8(wchar_t *dst_w, const char *src_c, const size } \ (Result) <<= 6; \ (Result) |= ((Chars)[(Count)] & 0x3f); \ - } + } (void)0 /* uses glib functions but not from glib */ diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c index 5e5726d9244..a14d602c586 100644 --- a/source/blender/bmesh/intern/bmesh_core.c +++ b/source/blender/bmesh/intern/bmesh_core.c @@ -42,11 +42,11 @@ // #define USE_DEBUG_INDEX_MEMCHECK #ifdef USE_DEBUG_INDEX_MEMCHECK -#define DEBUG_MEMCHECK_INDEX_INVALIDATE(ele) \ - { \ - int undef_idx; \ - BM_elem_index_set(ele, undef_idx); /* set_ok_invalid */ \ - } \ +#define DEBUG_MEMCHECK_INDEX_INVALIDATE(ele) \ + { \ + int undef_idx; \ + BM_elem_index_set(ele, undef_idx); /* set_ok_invalid */ \ + } (void)0 #endif diff --git a/source/blender/bmesh/operators/bmo_connect.c b/source/blender/bmesh/operators/bmo_connect.c index 2d4c15dbaa5..653bbaf8602 100644 --- a/source/blender/bmesh/operators/bmo_connect.c +++ b/source/blender/bmesh/operators/bmo_connect.c @@ -178,7 +178,7 @@ static int clamp_index(const int x, const int len) BLI_array_append(arr2, arr_tmp[i]); \ } \ BLI_array_free(arr_tmp); \ - } + } (void)0 /* get the 2 loops matching 2 verts. * first attempt to get the face corners that use the edge defined by v1 & v2, diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 9bbba20c15e..08672a22666 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -2699,7 +2699,7 @@ short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, int setting else if (smode == ACHANNEL_SETFLAG_ADD) (sval) |= (sflag); \ else (sval) &= ~(sflag); \ } \ - } + } (void)0 /* Change value of some setting for a channel * - setting: eAnimChannel_Settings diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c index 24cae5d8652..ea875567705 100644 --- a/source/blender/editors/animation/fmodifier_ui.c +++ b/source/blender/editors/animation/fmodifier_ui.c @@ -79,7 +79,7 @@ #define DRAW_BACKDROP(height) \ { \ uiDefBut(block, ROUNDBOX, B_REDR, "", -3, yco - height, width + 3, height - 1, NULL, 5.0, 0.0, 12.0, (float)rb_col, ""); \ - } + } (void)0 /* callback to verify modifier data */ static void validate_fmodifier_cb(bContext *UNUSED(C), void *fcm_v, void *UNUSED(arg)) diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index b92d0fb345a..88627a6dabd 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -429,7 +429,7 @@ void ANIM_editkeyframes_refresh(bAnimContext *ac) if (check(2)) \ ok |= KEYFRAME_OK_H2; \ } \ - } + } (void)0 /* ------------------------ */ @@ -766,7 +766,7 @@ KeyframeEditFunc ANIM_editkeyframes_mirror(short type) bezt->h1 = HD_FREE; \ if (ELEM3(bezt->h2, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM)) \ bezt->h2 = HD_FREE; \ - } + } (void)0 /* Sets the selected bezier handles to type 'auto' */ static short set_bezier_auto(KeyframeEditData *UNUSED(ked), BezTriple *bezt) diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 6ffe3f1feeb..3e569f8eb96 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -525,7 +525,7 @@ static void gp_stroke_simplify(tGPsdata *p) co[0] += (float)(old_points[offs].x * sfac); \ co[1] += (float)(old_points[offs].y * sfac); \ pressure += old_points[offs].pressure * sfac; \ - } + } (void)0 for (i = 0, j = 0; i < num_points; i++) { if (i - j == 3) { diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c index 661f7ad7d0f..b13ba9a1aa3 100644 --- a/source/blender/editors/space_buttons/buttons_header.c +++ b/source/blender/editors/space_buttons/buttons_header.c @@ -125,9 +125,9 @@ void buttons_header_buttons(const bContext *C, ARegion *ar) if (sbuts->pathflag & (1 << _ctx)) { \ but = uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, _icon, xco += BUT_UNIT_X, yco, BUT_UNIT_X, UI_UNIT_Y, &(sbuts->mainb), 0.0, (float)_ctx, 0, 0, TIP_(_tip)); \ uiButClearFlag(but, UI_BUT_UNDO); \ - } \ + } (void)0 - BUTTON_HEADER_CTX(BCONTEXT_RENDER, ICON_SCENE, N_("Render")) + BUTTON_HEADER_CTX(BCONTEXT_RENDER, ICON_SCENE, N_("Render")); BUTTON_HEADER_CTX(BCONTEXT_SCENE, ICON_SCENE_DATA, N_("Scene")); BUTTON_HEADER_CTX(BCONTEXT_WORLD, ICON_WORLD, N_("World")); BUTTON_HEADER_CTX(BCONTEXT_OBJECT, ICON_OBJECT_DATA, N_("Object")); diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 43de6126ffb..d22b3125987 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -2953,7 +2953,7 @@ static void draw_em_measure_stats(View3D *v3d, Object *ob, BMEditMesh *em, UnitS else \ BLI_snprintf(numstr, sizeof(numstr), conv_float, area); \ view3d_cached_text_draw_add(vmid, numstr, 0, txt_flag, col); \ - } + } (void)0 UI_GetThemeColor3ubv(TH_DRAWEXTRA_FACEAREA, col); diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index f09310e53c7..4c6ead3d3f4 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -1660,7 +1660,7 @@ static int gpu_count_grid_quads(BLI_bitmap *grid_hidden, glDeleteBuffersARB(1, &(buffer_)); \ (buffer_) = 0; \ } \ - } + } (void)0 /* end FILL_QUAD_BUFFER */ static GLuint gpu_get_grid_buffer(int gridsize, GLenum *index_type, unsigned *totquad) diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c index 45d2d16d794..2370dbeebc5 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -49,7 +49,7 @@ { \ if (fcc == 0) { fcc = mmioFOURCC('N', 'o', 'n', 'e'); } \ if (fcc == BI_RLE8) { fcc = mmioFOURCC('R', 'l', 'e', '8'); } \ - } + } (void)0 #endif diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c index 1a96e55e3d1..47555302a59 100644 --- a/source/blender/imbuf/intern/jpeg.c +++ b/source/blender/imbuf/intern/jpeg.c @@ -223,7 +223,7 @@ static void memory_source(j_decompress_ptr cinfo, unsigned char *buffer, size_t if (! (*datasrc->fill_input_buffer) (cinfo)) \ { action; } \ INPUT_RELOAD(cinfo); \ - } + } (void)0 /* Read a byte into variable V. diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 008b54efb77..6f26763fc0e 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -3031,7 +3031,7 @@ int RNA_property_collection_raw_array(PointerRNA *ptr, PropertyRNA *prop, Proper case PROP_RAW_DOUBLE: var = (dtype)((double*)raw.array)[a]; break; \ default: var = (dtype)0; \ } \ -} +} (void)0 #define RAW_SET(dtype, raw, a, var) \ { \ @@ -3043,7 +3043,7 @@ int RNA_property_collection_raw_array(PointerRNA *ptr, PropertyRNA *prop, Proper case PROP_RAW_DOUBLE: ((double*)raw.array)[a] = (double)var; break; \ default: break; \ } \ -} +} (void)0 int RNA_raw_type_sizeof(RawPropertyType type) { diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index 381d0f46c28..9a69cfc7f15 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -179,7 +179,7 @@ static char *rna_ColorRampElement_path(PointerRNA *ptr) MEM_freeN(texture_path); \ } \ } \ -} +} (void)0 /* determine the path from the ID-block to the ramp */ /* FIXME: this is a very slow way to do it, but it will have to suffice... */ diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 09cbf8bd90a..7d73de00b49 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -64,7 +64,7 @@ BlenderDefRNA DefRNA = {NULL, {NULL, NULL}, {NULL, NULL}, NULL, 0, 0, 0, 1}; fprintf(stderr, "%s: '%s' '%s' description ends with a '.' !\n", \ __func__, id1 ? id1 : "", id2 ? id2 : ""); \ } \ - } \ + } (void)0 #else # define DESCR_CHECK(description, id1, id2) diff --git a/source/blender/nodes/composite/node_composite_util.c b/source/blender/nodes/composite/node_composite_util.c index 0d1840a7a7d..3806cf4543a 100644 --- a/source/blender/nodes/composite/node_composite_util.c +++ b/source/blender/nodes/composite/node_composite_util.c @@ -1349,7 +1349,7 @@ void IIR_gauss(CompBuf* src, float sigma, int chan, int xy) Y[L-3] = cf[0]*W[L-3] + cf[1]*Y[L-2] + cf[2]*Y[L-1] + cf[3]*tsv[0]; \ for (i=L-4; i>=0; i--) \ Y[i] = cf[0]*W[i] + cf[1]*Y[i+1] + cf[2]*Y[i+2] + cf[3]*Y[i+3]; \ -} +} (void)0 // intermediate buffers sz = MAX2(src->x, src->y); diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index 77ccf802663..c0eef08756f 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -304,7 +304,7 @@ static int py_long_as_int(PyObject *py_long, int *r_int) if (PyErr_Occurred()) \ return NULL; \ return bpy_prop_deferred_return(pymeth_##_func, kw); \ - } \ + } (void)0 /* terse macros for error checks shared between all funcs cant use function * calls because of static strins passed to pyrna_set_to_enum_bitfield */ @@ -327,10 +327,10 @@ static int py_long_as_int(PyObject *py_long, int *r_int) #_func"(options={ ...}):")) \ { \ return NULL; \ - } \ + } (void)0 #define BPY_PROPDEF_SUBTYPE_CHECK(_func, _property_flag_items, _subtype) \ - BPY_PROPDEF_CHECK(_func, _property_flag_items) \ + BPY_PROPDEF_CHECK(_func, _property_flag_items); \ if (pysubtype && RNA_enum_value_from_id(_subtype, \ pysubtype, \ &subtype) == 0) \ @@ -339,7 +339,7 @@ static int py_long_as_int(PyObject *py_long, int *r_int) #_func"(subtype='%s'): invalid subtype", \ pysubtype); \ return NULL; \ - } \ + } (void)0 #define BPY_PROPDEF_NAME_DOC \ @@ -397,7 +397,7 @@ static PyObject *BPy_BoolProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; - BPY_PROPDEF_HEAD(BoolProperty) + BPY_PROPDEF_HEAD(BoolProperty); if (srna) { static const char *kwlist[] = {"attr", "name", "description", "default", @@ -422,7 +422,7 @@ static PyObject *BPy_BoolProperty(PyObject *self, PyObject *args, PyObject *kw) return NULL; } - BPY_PROPDEF_SUBTYPE_CHECK(BoolProperty, property_flag_items, property_subtype_number_items) + BPY_PROPDEF_SUBTYPE_CHECK(BoolProperty, property_flag_items, property_subtype_number_items); if (bpy_prop_callback_check(update_cb, 2) == -1) { return NULL; @@ -474,7 +474,7 @@ static PyObject *BPy_BoolVectorProperty(PyObject *self, PyObject *args, PyObject { StructRNA *srna; - BPY_PROPDEF_HEAD(BoolVectorProperty) + BPY_PROPDEF_HEAD(BoolVectorProperty); if (srna) { static const char *kwlist[] = {"attr", "name", "description", "default", @@ -561,7 +561,7 @@ static PyObject *BPy_IntProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; - BPY_PROPDEF_HEAD(IntProperty) + BPY_PROPDEF_HEAD(IntProperty); if (srna) { static const char *kwlist[] = {"attr", "name", "description", "default", @@ -643,7 +643,7 @@ static PyObject *BPy_IntVectorProperty(PyObject *self, PyObject *args, PyObject { StructRNA *srna; - BPY_PROPDEF_HEAD(IntVectorProperty) + BPY_PROPDEF_HEAD(IntVectorProperty); if (srna) { static const char *kwlist[] = {"attr", "name", "description", "default", @@ -738,7 +738,7 @@ static PyObject *BPy_FloatProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; - BPY_PROPDEF_HEAD(FloatProperty) + BPY_PROPDEF_HEAD(FloatProperty); if (srna) { static const char *kwlist[] = {"attr", "name", "description", "default", @@ -832,7 +832,7 @@ static PyObject *BPy_FloatVectorProperty(PyObject *self, PyObject *args, PyObjec { StructRNA *srna; - BPY_PROPDEF_HEAD(FloatVectorProperty) + BPY_PROPDEF_HEAD(FloatVectorProperty); if (srna) { static const char *kwlist[] = {"attr", "name", "description", "default", @@ -928,7 +928,7 @@ static PyObject *BPy_StringProperty(PyObject *self, PyObject *args, PyObject *kw { StructRNA *srna; - BPY_PROPDEF_HEAD(StringProperty) + BPY_PROPDEF_HEAD(StringProperty); if (srna) { static const char *kwlist[] = {"attr", "name", "description", "default", @@ -1235,7 +1235,7 @@ static PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; - BPY_PROPDEF_HEAD(EnumProperty) + BPY_PROPDEF_HEAD(EnumProperty); if (srna) { static const char *kwlist[] = {"attr", "items", "name", "description", "default", @@ -1262,7 +1262,7 @@ static PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw) return NULL; } - BPY_PROPDEF_CHECK(EnumProperty, property_flag_enum_items) + BPY_PROPDEF_CHECK(EnumProperty, property_flag_enum_items); if (bpy_prop_callback_check(update_cb, 2) == -1) { return NULL; @@ -1385,7 +1385,7 @@ static PyObject *BPy_PointerProperty(PyObject *self, PyObject *args, PyObject *k { StructRNA *srna; - BPY_PROPDEF_HEAD(PointerProperty) + BPY_PROPDEF_HEAD(PointerProperty); if (srna) { static const char *kwlist[] = {"attr", "type", "name", "description", "options", "update", NULL}; @@ -1408,7 +1408,7 @@ static PyObject *BPy_PointerProperty(PyObject *self, PyObject *args, PyObject *k return NULL; } - BPY_PROPDEF_CHECK(PointerProperty, property_flag_items) + BPY_PROPDEF_CHECK(PointerProperty, property_flag_items); ptype = pointer_type_from_py(type, "PointerProperty(...):"); if (!ptype) @@ -1450,7 +1450,7 @@ static PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject { StructRNA *srna; - BPY_PROPDEF_HEAD(CollectionProperty) + BPY_PROPDEF_HEAD(CollectionProperty); if (srna) { static const char *kwlist[] = {"attr", "type", "name", "description", "options", NULL}; @@ -1471,7 +1471,7 @@ static PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject return NULL; } - BPY_PROPDEF_CHECK(CollectionProperty, property_flag_items) + BPY_PROPDEF_CHECK(CollectionProperty, property_flag_items); ptype = pointer_type_from_py(type, "CollectionProperty(...):"); if (!ptype) diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index fe18fd040eb..6ad1874297f 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -2046,7 +2046,7 @@ static int pyrna_prop_collection_bool(BPy_PropertyRNA *self) "bpy_prop_collection[%d]: out of range.", keynum); \ return ret_err; \ } \ - } \ + } (void)0 /* internal use only */ @@ -6856,7 +6856,7 @@ static int bpy_class_validate(PointerRNA *dummyptr, void *py_data, int *have_fun } \ } \ Py_XDECREF(item); \ - } \ + } (void)0 BPY_REPLACEMENT_STRING("bl_idname", "__name__"); diff --git a/source/blender/render/intern/source/strand.c b/source/blender/render/intern/source/strand.c index 02d342754ea..7e0744096b3 100644 --- a/source/blender/render/intern/source/strand.c +++ b/source/blender/render/intern/source/strand.c @@ -569,10 +569,10 @@ static void do_strand_fillac(void *handle, int x, int y, float u, float v, float #define CHECK_ADD(n) \ if (apn->p[n]==strnr && apn->obi[n]==obi && apn->seg[n]==seg) \ - { if (!(apn->mask[n] & mask)) { apn->mask[n] |= mask; apn->v[n] += t; apn->u[n] += s; } break; } + { if (!(apn->mask[n] & mask)) { apn->mask[n] |= mask; apn->v[n] += t; apn->u[n] += s; } break; } (void)0 #define CHECK_ASSIGN(n) \ if (apn->p[n]==0) \ - {apn->obi[n]= obi; apn->p[n]= strnr; apn->z[n]= zverg; apn->mask[n]= mask; apn->v[n]= t; apn->u[n]= s; apn->seg[n]= seg; break; } + {apn->obi[n]= obi; apn->p[n]= strnr; apn->z[n]= zverg; apn->mask[n]= mask; apn->v[n]= t; apn->u[n]= s; apn->seg[n]= seg; break; } (void)0 /* add to pixel list */ if (zverg < bufferz && (spart->totapixbuf[offset] < MAX_ZROW)) { |