Cleanup: empty expression statement warning

This commit is contained in:
Campbell Barton 2019-04-02 17:54:04 +11:00
parent 17c15798c3
commit 6470056a0d
41 changed files with 86 additions and 83 deletions

@ -1110,7 +1110,7 @@ GHOST_SystemX11::processEvent(XEvent *xe)
}
else if (status == XLookupKeySym) {
/* this key doesn't have a text representation, it is a command
* key of some sort */;
* key of some sort */
}
else {
printf("Bad keycode lookup. Keysym 0x%x Status: %s\n",

@ -550,8 +550,9 @@ STR_String& STR_String::TrimLeft()
{
int skip;
assertd(this->m_data != NULL);
for (skip = 0; isSpace(this->m_data[skip]); skip++, this->m_len--)
{};
for (skip = 0; isSpace(this->m_data[skip]); skip++, this->m_len--) {
/* pass */
}
memmove(this->m_data, this->m_data + skip, this->m_len + 1);
return *this;
}
@ -590,8 +591,9 @@ STR_String& STR_String::TrimLeft(char *set)
{
int skip;
assertd(this->m_data != NULL);
for (skip = 0; this->m_len && strchr(set, this->m_data[skip]); skip++, this->m_len--)
{};
for (skip = 0; this->m_len && strchr(set, this->m_data[skip]); skip++, this->m_len--) {
/* pass */
}
memmove(this->m_data, this->m_data + skip, this->m_len + 1);
return *this;
}

@ -143,12 +143,12 @@ typedef struct ClothSpring {
ClothSpring;
// some macro enhancements for vector treatment
#define VECSUBADDSS(v1,v2,aS,v3,bS) {*(v1)-= *(v2)*aS + *(v3)*bS; *(v1+1)-= *(v2+1)*aS + *(v3+1)*bS; *(v1+2)-= *(v2+2)*aS + *(v3+2)*bS;}
#define VECADDSS(v1,v2,aS,v3,bS) {*(v1)= *(v2)*aS + *(v3)*bS; *(v1+1)= *(v2+1)*aS + *(v3+1)*bS; *(v1+2)= *(v2+2)*aS + *(v3+2)*bS;}
#define VECADDS(v1,v2,v3,bS) {*(v1)= *(v2) + *(v3)*bS; *(v1+1)= *(v2+1) + *(v3+1)*bS; *(v1+2)= *(v2+2) + *(v3+2)*bS;}
#define VECSUBMUL(v1,v2,aS) {*(v1)-= *(v2) * aS; *(v1+1)-= *(v2+1) * aS; *(v1+2)-= *(v2+2) * aS;}
#define VECSUBS(v1,v2,v3,bS) {*(v1)= *(v2) - *(v3)*bS; *(v1+1)= *(v2+1) - *(v3+1)*bS; *(v1+2)= *(v2+2) - *(v3+2)*bS;}
#define VECADDMUL(v1,v2,aS) {*(v1)+= *(v2) * aS; *(v1+1)+= *(v2+1) * aS; *(v1+2)+= *(v2+2) * aS;}
#define VECSUBADDSS(v1,v2,aS,v3,bS) {*(v1)-= *(v2)*aS + *(v3)*bS; *(v1+1)-= *(v2+1)*aS + *(v3+1)*bS; *(v1+2)-= *(v2+2)*aS + *(v3+2)*bS;} ((void)0)
#define VECADDSS(v1,v2,aS,v3,bS) {*(v1)= *(v2)*aS + *(v3)*bS; *(v1+1)= *(v2+1)*aS + *(v3+1)*bS; *(v1+2)= *(v2+2)*aS + *(v3+2)*bS;} ((void)0)
#define VECADDS(v1,v2,v3,bS) {*(v1)= *(v2) + *(v3)*bS; *(v1+1)= *(v2+1) + *(v3+1)*bS; *(v1+2)= *(v2+2) + *(v3+2)*bS;} ((void)0)
#define VECSUBMUL(v1,v2,aS) {*(v1)-= *(v2) * aS; *(v1+1)-= *(v2+1) * aS; *(v1+2)-= *(v2+2) * aS;} ((void)0)
#define VECSUBS(v1,v2,v3,bS) {*(v1)= *(v2) - *(v3)*bS; *(v1+1)= *(v2+1) - *(v3+1)*bS; *(v1+2)= *(v2+2) - *(v3+2)*bS;} ((void)0)
#define VECADDMUL(v1,v2,aS) {*(v1)+= *(v2) * aS; *(v1+1)+= *(v2+1) * aS; *(v1+2)+= *(v2+2) * aS;} ((void)0)
/* SIMULATION FLAGS: goal flags,.. */
/* These are the bits used in SimSettings.flags. */

@ -203,7 +203,7 @@ void BKE_scene_objects_iterator_end(struct BLI_Iterator *iter);
#define FOREACH_COLLECTION_END \
} \
}
} ((void)0)
#define FOREACH_SCENE_OBJECT_BEGIN(scene, _instance) \
ITER_BEGIN(BKE_scene_objects_iterator_begin, \

@ -344,37 +344,37 @@ bool BKE_view_layer_filter_edit_mesh_has_edges(struct Object *ob, void *user_dat
#define BKE_view_layer_array_from_objects_in_edit_mode(view_layer, v3d, r_len) \
BKE_view_layer_array_from_objects_in_mode( \
view_layer, v3d, r_len, { \
.object_mode = OB_MODE_EDIT});
.object_mode = OB_MODE_EDIT})
#define BKE_view_layer_array_from_bases_in_edit_mode(view_layer, v3d, r_len) \
BKE_view_layer_array_from_bases_in_mode( \
view_layer, v3d, r_len, { \
.object_mode = OB_MODE_EDIT});
.object_mode = OB_MODE_EDIT})
#define BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, v3d, r_len) \
BKE_view_layer_array_from_objects_in_mode( \
view_layer, v3d, r_len, { \
.object_mode = OB_MODE_EDIT, \
.no_dup_data = true});
.no_dup_data = true})
#define BKE_view_layer_array_from_bases_in_edit_mode_unique_data(view_layer, v3d, r_len) \
BKE_view_layer_array_from_bases_in_mode( \
view_layer, v3d, r_len, { \
.object_mode = OB_MODE_EDIT, \
.no_dup_data = true});
.no_dup_data = true})
#define BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(view_layer, v3d, r_len) \
BKE_view_layer_array_from_objects_in_mode( \
view_layer, v3d, r_len, { \
.object_mode = OB_MODE_EDIT, \
.no_dup_data = true, \
.filter_fn = BKE_view_layer_filter_edit_mesh_has_uvs});
.filter_fn = BKE_view_layer_filter_edit_mesh_has_uvs})
#define BKE_view_layer_array_from_objects_in_mode_unique_data(view_layer, v3d, r_len, mode) \
BKE_view_layer_array_from_objects_in_mode( \
view_layer, v3d, r_len, { \
.object_mode = mode, \
.no_dup_data = true});
.no_dup_data = true})
#ifdef __cplusplus
}

@ -350,7 +350,7 @@ void pbvh_vertex_iter_init(PBVH *bvh, PBVHNode *node,
#define BKE_pbvh_vertex_iter_end \
} \
} \
}
} ((void)0)
void BKE_pbvh_node_get_proxies(PBVHNode *node, PBVHProxyNode **proxies, int *proxy_count);
void BKE_pbvh_node_free_proxies(PBVHNode *node);

@ -275,7 +275,7 @@ void BKE_blender_userdef_app_template_data_swap(UserDef *userdef_a, UserDef *use
memcpy(&(userdef_tmp.id), &(userdef_a->id), sizeof(userdef_tmp.id)); \
memcpy(&(userdef_a->id), &(userdef_b->id), sizeof(userdef_tmp.id)); \
memcpy(&(userdef_b->id), &(userdef_tmp.id), sizeof(userdef_tmp.id)); \
}
} ((void)0)
#define LIST_SWAP(id) { \
SWAP(ListBase, userdef_a->id, userdef_b->id); \

@ -2373,7 +2373,7 @@ void psys_cache_child_paths(
totparent = ctx.totparent;
if (editupdate && sim->psys->childcache && totchild == sim->psys->totchildcache) {
; /* just overwrite the existing cache */
/* just overwrite the existing cache */
}
else {
/* clear out old and create new empty path cache */

@ -107,7 +107,7 @@ static void pbvh_bmesh_verify(PBVH *bvh);
#define BM_FACES_OF_VERT_ITER_END \
} \
BM_LOOPS_OF_VERT_ITER_END; \
}
} ((void)0)
static void bm_edges_from_tri(BMesh *bm, BMVert *v_tri[3], BMEdge *e_tri[3])
{

@ -331,7 +331,7 @@ WorkSpaceLayout *BKE_workspace_layout_iter_circular(
return iter_layout;
}
}
LISTBASE_CIRCULAR_FORWARD_END(&workspace->layouts, iter_layout, start)
LISTBASE_CIRCULAR_FORWARD_END(&workspace->layouts, iter_layout, start);
}
return NULL;

@ -111,7 +111,7 @@ if ((lb)->first && (lb_init || (lb_init = (lb)->first))) { \
#define LISTBASE_CIRCULAR_FORWARD_END(lb, lb_iter, lb_init) \
} while ((lb_iter = (lb_iter)->next ? (lb_iter)->next : (lb)->first), \
(lb_iter != lb_init)); \
}
} ((void)0)
#define LISTBASE_CIRCULAR_BACKWARD_BEGIN(lb, lb_iter, lb_init) \
if ((lb)->last && (lb_init || (lb_init = (lb)->last))) { \
@ -120,7 +120,7 @@ if ((lb)->last && (lb_init || (lb_init = (lb)->last))) { \
#define LISTBASE_CIRCULAR_BACKWARD_END(lb, lb_iter, lb_init) \
} while ((lb_iter = (lb_iter)->prev ? (lb_iter)->prev : (lb)->last), \
(lb_iter != lb_init)); \
}
} ((void)0)
#define LISTBASE_FOREACH(type, var, list) \
for (type var = (type)((list)->first); \

@ -1434,7 +1434,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
scene->eevee.flag &= ~_flag; \
} \
} \
}
} ((void)0)
#define EEVEE_GET_INT(_props, _name) \
{ \
@ -1442,7 +1442,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
if (_idprop != NULL) { \
scene->eevee._name = IDP_Int(_idprop); \
} \
}
} ((void)0)
#define EEVEE_GET_FLOAT(_props, _name) \
{ \
@ -1450,7 +1450,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
if (_idprop != NULL) { \
scene->eevee._name = IDP_Float(_idprop); \
} \
}
} ((void)0)
#define EEVEE_GET_FLOAT_ARRAY(_props, _name, _length) \
{ \
@ -1461,7 +1461,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
scene->eevee._name [_i] = _values[_i]; \
} \
} \
}
} ((void)0)
IDProperty *props = IDP_GetPropertyFromGroup(scene->layer_properties, RE_engine_id_BLENDER_EEVEE);
EEVEE_GET_BOOL(props, volumetric_enable, SCE_EEVEE_VOLUMETRIC_ENABLED);

@ -52,7 +52,7 @@ static void do_versions_theme(UserDef *userdef, bTheme *btheme)
}
#define FROM_DEFAULT_V4_UCHAR(member) \
copy_v4_v4_char(btheme->member, U_theme_default.member);
copy_v4_v4_char(btheme->member, U_theme_default.member)
if (!USER_VERSION_ATLEAST(280, 25)) {
copy_v4_v4_char(btheme->space_action.anim_preview_range, btheme->space_action.anim_active);

@ -158,7 +158,7 @@ void DEG_iterator_objects_end(struct BLI_Iterator *iter);
#define DEG_OBJECT_ITER_END \
ITER_END; \
}
} ((void)0)
/**
* Depsgraph objects iterator for draw manager and final render

@ -119,14 +119,14 @@ static void eevee_create_shader_downsample(void)
GPU_ATTACHMENT_NONE, \
GPU_ATTACHMENT_TEXTURE(tex), \
}); \
}
} ((void)0)
#define CLEANUP_BUFFER(tex, fb, fb_color) { \
/* Cleanup to release memory */ \
DRW_TEXTURE_FREE_SAFE(tex); \
GPU_FRAMEBUFFER_FREE_SAFE(fb); \
GPU_FRAMEBUFFER_FREE_SAFE(fb_color); \
}
} ((void)0)
void EEVEE_effects_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, Object *camera, const bool minimal)
{

@ -984,15 +984,15 @@ static bool eevee_lightbake_cube_comp(EEVEE_LightProbe *prb_a, EEVEE_LightProbe
bool sorted = false; \
while (!sorted) { \
sorted = true; \
for (int i = 0; i < (elems_len) - 1; ++i) { \
if ((comp_fn)((elems) + i, (elems) + i+1)) { \
SWAP(elems_type, (elems)[i], (elems)[i+1]); \
SWAP(LightProbe *, (prbs)[i], (prbs)[i+1]); \
for (int i = 0; i < (elems_len) - 1; i++) { \
if ((comp_fn)((elems) + i, (elems) + i + 1)) { \
SWAP(elems_type, (elems)[i], (elems)[i + 1]); \
SWAP(LightProbe *, (prbs)[i], (prbs)[i + 1]); \
sorted = false; \
} \
} \
} \
}
} ((void)0)
static void eevee_lightbake_gather_probes(EEVEE_LightBake *lbake)
{

@ -616,7 +616,7 @@ void EEVEE_render_update_passes(RenderEngine *engine, Scene *scene, ViewLayer *v
else if (channels == 3) type = SOCK_VECTOR; \
else type = SOCK_FLOAT; \
RE_engine_register_pass(engine, scene, view_layer, RE_PASSNAME_ ## name, channels, chanid, type); \
}
} ((void)0)
CHECK_PASS(Z, 1, "Z");
CHECK_PASS(MIST, 1, "Z");

@ -459,7 +459,7 @@ void GPENCIL_render_to_image(void *vedata, struct RenderEngine *engine, struct R
GPU_framebuffer_clear_color_depth(fbl->multisample_fb, (const float[4]){0.0f}, 1.0f); \
DRW_stats_query_end(); \
} \
}
} ((void)0)
#define MULTISAMPLE_GP_SYNC_DISABLE(lvl, fbl, fb, txl) { \
if ((lvl > 0) && (fbl->multisample_fb != NULL)) { \
@ -468,7 +468,7 @@ void GPENCIL_render_to_image(void *vedata, struct RenderEngine *engine, struct R
DRW_multisamples_resolve(txl->multisample_depth, txl->multisample_color, true); \
DRW_stats_query_end(); \
} \
}
} ((void)0)
#define GPENCIL_3D_DRAWMODE(ob, gpd) \
((gpd) && (gpd->draw_mode == GP_DRAWMODE_3D) && \

@ -120,7 +120,7 @@ typedef char DRWViewportEmptyList;
DRW_multisamples_resolve(dtxl->multisample_depth, dtxl->multisample_color, true); \
DRW_stats_query_end(); \
} \
}
} ((void)0)
#define MULTISAMPLE_SYNC_DISABLE_NO_DEPTH(dfbl, dtxl) { \
if (dfbl->multisample_fb != NULL) { \
@ -129,7 +129,7 @@ typedef char DRWViewportEmptyList;
DRW_multisamples_resolve(dtxl->multisample_depth, dtxl->multisample_color, false); \
DRW_stats_query_end(); \
} \
}
} ((void)0)

@ -309,7 +309,7 @@ static void MPATH_draw_scene(void *vedata)
DRW_draw_pass(psl->lines);
DRW_draw_pass(psl->points);
MULTISAMPLE_SYNC_DISABLE_NO_DEPTH(dfbl, dtxl)
MULTISAMPLE_SYNC_DISABLE_NO_DEPTH(dfbl, dtxl);
}
/* *************************** Draw Engine Defines ****************************** */

@ -2751,9 +2751,10 @@ static const float staticSine[16] = {
0.994521895368f, 1.0f,
};
#define set_vert(a, b, quarter) \
copy_v2_fl2(pos, (quarter % 2 == 0) ? -(a) : (a), (quarter < 2) ? -(b) : (b)); \
GPU_vertbuf_attr_set(vbo, attr_id.pos, v++, pos);
#define set_vert(a, b, quarter) { \
copy_v2_fl2(pos, (quarter % 2 == 0) ? -(a) : (a), (quarter < 2) ? -(b) : (b)); \
GPU_vertbuf_attr_set(vbo, attr_id.pos, v++, pos); \
} ((void)0)
GPUBatch *DRW_cache_bone_dof_sphere_get(void)
{

@ -1716,7 +1716,7 @@ bool DRW_render_check_grease_pencil(Depsgraph *depsgraph)
}
}
}
DEG_OBJECT_ITER_FOR_RENDER_ENGINE_END
DEG_OBJECT_ITER_FOR_RENDER_ENGINE_END;
return false;
}
@ -1959,7 +1959,7 @@ void DRW_render_object_iter(
drw_batch_cache_generate_requested(ob);
}
}
DEG_OBJECT_ITER_END
DEG_OBJECT_ITER_END;
}
/* Assume a valid gl context is bound (and that the gl_context_mutex has been acquired).

@ -247,7 +247,7 @@ void DRW_draw_cursor(void)
#define CURSOR_EDGE(axis_vec, axis, sign) { \
CURSOR_VERT(axis_vec, axis, sign 1.0f); \
CURSOR_VERT(axis_vec, axis, sign 0.25f); \
}
} ((void)0)
for (int axis = 0; axis < 3; axis++) {
float axis_vec[3] = {0};

@ -305,7 +305,7 @@ static void EDIT_CURVE_draw_scene(void *vedata)
DRW_draw_pass(psl->wire_pass);
MULTISAMPLE_SYNC_DISABLE(dfbl, dtxl)
MULTISAMPLE_SYNC_DISABLE(dfbl, dtxl);
}
/* Unfortunately this pass cannot be AA'd without
@ -318,7 +318,7 @@ static void EDIT_CURVE_draw_scene(void *vedata)
DRW_draw_pass(psl->wire_pass_xray);
MULTISAMPLE_SYNC_DISABLE_NO_DEPTH(dfbl, dtxl)
MULTISAMPLE_SYNC_DISABLE_NO_DEPTH(dfbl, dtxl);
}
/* Thoses passes don't write to depth and are AA'ed using other tricks. */

@ -262,7 +262,7 @@ static void EDIT_LATTICE_draw_scene(void *vedata)
DRW_draw_pass(psl->wire_pass);
DRW_draw_pass(psl->vert_pass);
MULTISAMPLE_SYNC_DISABLE(dfbl, dtxl)
MULTISAMPLE_SYNC_DISABLE(dfbl, dtxl);
/* If you changed framebuffer, double check you rebind
* the default one with its textures attached before finishing */

@ -3308,7 +3308,7 @@ static void OBJECT_draw_scene(void *vedata)
DRW_draw_pass(psl->particle);
DRW_draw_pass(stl->g_data->sgl.bone_axes);
MULTISAMPLE_SYNC_DISABLE(dfbl, dtxl)
MULTISAMPLE_SYNC_DISABLE(dfbl, dtxl);
DRW_draw_pass(stl->g_data->sgl.image_empties);

@ -759,7 +759,7 @@ static int gizmo_cage2d_test_select(
r.ymin = -size[1] + margin[1];
r.xmax = size[0] - margin[0];
r.ymax = size[1] - margin[1];
};
}
bool isect = BLI_rctf_isect_pt_v(&r, point_local);
if (isect) {
return ED_GIZMO_CAGE2D_PART_TRANSLATE;

@ -509,11 +509,11 @@ static void gp_brush_jitter(
static void gp_brush_angle(bGPdata *gpd, Brush *brush, tGPspoint *pt, const float mval[2])
{
float mvec[2];
float sen = brush->gpencil_settings->draw_angle_factor; /* sensitivity */;
float sen = brush->gpencil_settings->draw_angle_factor; /* sensitivity */
float fac;
float mpressure;
/* default angle of brush in radians */;
/* default angle of brush in radians */
float angle = brush->gpencil_settings->draw_angle;
/* angle vector of the brush with full thickness */
float v0[2] = { cos(angle), sin(angle) };

@ -834,7 +834,7 @@ static void gp_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi)
const float fac = p2d->rnd[0] * exfactor * jitter;
/* vector */
float mvec[2], svec[2];;
float mvec[2], svec[2];
if (i > 0) {
mvec[0] = (p2d->x - (p2d - 1)->x);
mvec[1] = (p2d->y - (p2d - 1)->y);

@ -735,7 +735,7 @@ float ANIM_unit_mapping_get_factor(struct Scene *scene, struct ID *id, struct FC
if (smode == ACHANNEL_SETFLAG_INVERT) (channel)->flag ^= (sflag); \
else if (smode == ACHANNEL_SETFLAG_ADD) (channel)->flag |= (sflag); \
else (channel)->flag &= ~(sflag); \
}
} ((void)0)
/* set/clear/toggle macro, where the flag is negative
* - channel - channel with a 'flag' member that we're setting
@ -747,7 +747,7 @@ float ANIM_unit_mapping_get_factor(struct Scene *scene, struct ID *id, struct FC
if (smode == ACHANNEL_SETFLAG_INVERT) (channel)->flag ^= (sflag); \
else if (smode == ACHANNEL_SETFLAG_ADD) (channel)->flag &= ~(sflag); \
else (channel)->flag |= (sflag); \
}
} ((void)0)
/* --------- anim_deps.c, animation updates -------- */

@ -476,7 +476,7 @@ static void init_brush_icons(void)
di = def_internal_icon(NULL, icon_id, 0, 0, w, ICON_TYPE_BUFFER, 0); \
di->data.buffer.image->datatoc_rect = rect; \
di->data.buffer.image->datatoc_size = size; \
}
} ((void)0)
/* end INIT_BRUSH_ICON */
const int w = 96; /* warning, brush size hardcoded in C, but it gets scaled */
@ -614,7 +614,7 @@ static void init_event_icons(void)
di->data.input.icon = icon_id; \
di->data.input.next = di_next; \
di_next = di; \
}
} ((void)0)
/* end INIT_EVENT_ICON */
const int w = 16; /* DUMMY */

@ -1039,7 +1039,7 @@ void EDBM_verts_mirror_cache_begin_ex(
BLI_kdtree_3d_balance(tree);
}
#define VERT_INTPTR(_v, _i) r_index ? &r_index[_i] : BM_ELEM_CD_GET_VOID_P(_v, cd_vmirr_offset);
#define VERT_INTPTR(_v, _i) (r_index ? &r_index[_i] : BM_ELEM_CD_GET_VOID_P(_v, cd_vmirr_offset))
BM_ITER_MESH_INDEX (v, &iter, bm, BM_VERTS_OF_MESH, i) {
BLI_assert(BM_elem_index_get(v) == i);

@ -2215,7 +2215,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, ViewLayer
Object *obn;
if (ob->mode & OB_MODE_POSE) {
; /* nothing? */
/* nothing? */
}
else {
obn = ID_NEW_SET(ob, BKE_object_duplicate(bmain, ob, dupflag));

@ -320,7 +320,7 @@ static int collection_objects_remove_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
}
FOREACH_COLLECTION_END
FOREACH_COLLECTION_END;
if (!updated)
return OPERATOR_CANCELLED;

@ -254,7 +254,7 @@ static void do_item_rename(ARegion *ar, TreeElement *te, TreeStoreElem *tselem,
/* can't rename rna datablocks entries or listbases */
if (ELEM(tselem->type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM, TSE_ID_BASE, TSE_SCENE_OBJECTS_BASE)) {
/* do nothing */;
/* do nothing */
}
else if (ELEM(tselem->type, TSE_ANIM_DATA, TSE_NLA, TSE_DEFGROUP_BASE, TSE_CONSTRAINT_BASE, TSE_MODIFIER_BASE,
TSE_DRIVER_BASE, TSE_POSE_BASE, TSE_POSEGRP_BASE, TSE_R_LAYER_BASE, TSE_SCENE_COLLECTION_BASE,

@ -1327,7 +1327,7 @@ static short snap_mesh_edge_verts_mixed(
neasrest_precalc.ray_direction,
v_pair[0], v_pair[1], &lambda))
{
/* do nothing */;
/* do nothing */
}
else if (lambda < 0.25f || 0.75f < lambda) {
int v_id = lambda < 0.5f ? 0 : 1;

@ -2627,7 +2627,7 @@ static void UV_OT_select(wmOperatorType *ot)
/* api callbacks */
ot->exec = uv_select_exec;
ot->invoke = uv_select_invoke;
ot->poll = ED_operator_uvedit; /* requires space image */;
ot->poll = ED_operator_uvedit; /* requires space image */
/* properties */
RNA_def_boolean(ot->srna, "extend", 0,
@ -2676,7 +2676,7 @@ static void UV_OT_select_loop(wmOperatorType *ot)
/* api callbacks */
ot->exec = uv_select_loop_exec;
ot->invoke = uv_select_loop_invoke;
ot->poll = ED_operator_uvedit; /* requires space image */;
ot->poll = ED_operator_uvedit; /* requires space image */
/* properties */
RNA_def_boolean(ot->srna, "extend", 0,
@ -2811,7 +2811,7 @@ static void UV_OT_select_linked_pick(wmOperatorType *ot)
/* api callbacks */
ot->invoke = uv_select_linked_pick_invoke;
ot->exec = uv_select_linked_pick_exec;
ot->poll = ED_operator_uvedit; /* requires space image */;
ot->poll = ED_operator_uvedit; /* requires space image */
/* properties */
RNA_def_boolean(ot->srna, "extend", 0,
@ -2917,7 +2917,7 @@ static void UV_OT_select_split(wmOperatorType *ot)
/* api callbacks */
ot->exec = uv_select_split_exec;
ot->poll = ED_operator_uvedit; /* requires space image */;
ot->poll = ED_operator_uvedit; /* requires space image */
}
static void uv_select_sync_flush(ToolSettings *ts, BMEditMesh *em, const short select)
@ -3312,7 +3312,7 @@ static void UV_OT_select_box(wmOperatorType *ot)
ot->invoke = WM_gesture_box_invoke;
ot->exec = uv_box_select_exec;
ot->modal = WM_gesture_box_modal;
ot->poll = ED_operator_uvedit_space_image; /* requires space image */;
ot->poll = ED_operator_uvedit_space_image; /* requires space image */
ot->cancel = WM_gesture_box_cancel;
/* flags */
@ -3460,7 +3460,7 @@ static void UV_OT_select_circle(wmOperatorType *ot)
ot->invoke = WM_gesture_circle_invoke;
ot->modal = WM_gesture_circle_modal;
ot->exec = uv_circle_select_exec;
ot->poll = ED_operator_uvedit_space_image; /* requires space image */;
ot->poll = ED_operator_uvedit_space_image; /* requires space image */
ot->cancel = WM_gesture_circle_cancel;
/* flags */
@ -3697,7 +3697,7 @@ static void UV_OT_snap_cursor(wmOperatorType *ot)
/* api callbacks */
ot->exec = uv_snap_cursor_exec;
ot->poll = ED_operator_uvedit_space_image; /* requires space image */;
ot->poll = ED_operator_uvedit_space_image; /* requires space image */
/* properties */
RNA_def_enum(ot->srna, "target", target_items, 0, "Target", "Target to snap the selected UVs to");

@ -1385,13 +1385,13 @@ int GPU_texture_bound_number(GPUTexture *tex)
return tex->number;
}
#define WARN_NOT_BOUND(_tex) do { \
#define WARN_NOT_BOUND(_tex) { \
if (_tex->number == -1) { \
fprintf(stderr, "Warning : Trying to set parameter on a texture not bound.\n"); \
BLI_assert(0); \
return; \
} \
} while (0);
} ((void)0)
void GPU_texture_generate_mipmap(GPUTexture *tex)
{

@ -602,10 +602,10 @@ static int expandrow2(
float pixel_f;
#define EXPAND_CAPACITY_AT_INPUT_OK_OR_FAIL(iptr_next) \
if (UNLIKELY(iptr_next > iptr_end)) { goto fail; }
if (UNLIKELY(iptr_next > iptr_end)) { goto fail; } ((void)0)
#define EXPAND_CAPACITY_AT_OUTPUT_OK_OR_FAIL(optr_next) \
if (UNLIKELY(optr_next > optr_end)) { goto fail; }
if (UNLIKELY(optr_next > optr_end)) { goto fail; } ((void)0)
optr += z;
optr_end += z;
@ -683,10 +683,10 @@ static int expandrow(
uchar pixel, count;
#define EXPAND_CAPACITY_AT_INPUT_OK_OR_FAIL(iptr_next) \
if (UNLIKELY(iptr_next > iptr_end)) { goto fail; }
if (UNLIKELY(iptr_next > iptr_end)) { goto fail; } ((void)0)
#define EXPAND_CAPACITY_AT_OUTPUT_OK_OR_FAIL(optr_next) \
if (UNLIKELY(optr_next > optr_end)) { goto fail; }
if (UNLIKELY(optr_next > optr_end)) { goto fail; } ((void)0)
optr += z;
optr_end += z;

@ -1157,7 +1157,7 @@ void RNA_collection_clear(PointerRNA *ptr, const char *name);
#define RNA_PROP_END \
} \
RNA_property_collection_end(&rna_macro_iter); \
}
} ((void)0)
#define RNA_STRUCT_BEGIN(sptr, prop) \
{ \
@ -1174,7 +1174,7 @@ void RNA_collection_clear(PointerRNA *ptr, const char *name);
#define RNA_STRUCT_END \
} \
RNA_property_collection_end(&rna_macro_iter); \
}
} ((void)0)
/* check if the idproperty exists, for operators */
bool RNA_property_is_set_ex(PointerRNA *ptr, PropertyRNA *prop, bool use_ghost);

@ -580,7 +580,7 @@ void rna_def_bone_curved_common(StructRNA *srna, bool is_posebone)
RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update"); \
else \
RNA_def_property_update(prop, 0, "rna_Armature_update_data"); \
} (void)0;
} ((void)0)
PropertyRNA *prop;