Cleanup: empty expression statement warning
authorCampbell Barton <ideasman42@gmail.com>
Tue, 2 Apr 2019 06:54:04 +0000 (17:54 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 2 Apr 2019 06:54:04 +0000 (17:54 +1100)
41 files changed:
intern/ghost/intern/GHOST_SystemX11.cpp
intern/string/intern/STR_String.cpp
source/blender/blenkernel/BKE_cloth.h
source/blender/blenkernel/BKE_collection.h
source/blender/blenkernel/BKE_layer.h
source/blender/blenkernel/BKE_pbvh.h
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/pbvh_bmesh.c
source/blender/blenkernel/intern/workspace.c
source/blender/blenlib/BLI_listbase.h
source/blender/blenloader/intern/versioning_280.c
source/blender/blenloader/intern/versioning_userdef.c
source/blender/depsgraph/DEG_depsgraph_query.h
source/blender/draw/engines/eevee/eevee_effects.c
source/blender/draw/engines/eevee/eevee_lightcache.c
source/blender/draw/engines/eevee/eevee_render.c
source/blender/draw/engines/gpencil/gpencil_engine.h
source/blender/draw/intern/DRW_render.h
source/blender/draw/intern/draw_anim_viz.c
source/blender/draw/intern/draw_cache.c
source/blender/draw/intern/draw_manager.c
source/blender/draw/intern/draw_view.c
source/blender/draw/modes/edit_curve_mode.c
source/blender/draw/modes/edit_lattice_mode.c
source/blender/draw/modes/object_mode.c
source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/gpencil/gpencil_primitive.c
source/blender/editors/include/ED_anim_api.h
source/blender/editors/interface/interface_icons.c
source/blender/editors/mesh/editmesh_utils.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_collection.c
source/blender/editors/space_outliner/outliner_edit.c
source/blender/editors/transform/transform_snap_object.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/gpu/intern/gpu_texture.c
source/blender/imbuf/intern/iris.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/rna_armature.c

index 0bc5378b63bc1562641e35334fedd4d40e8a2944..ef08a6d7bb7a4489ec8d35699868821ad6c135b7 100644 (file)
@@ -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",
index 4030ae029ccf3546f3061af3d900cde1b33f6b77..b674871fbf39591e275c3dffa6595d4e30b3e9ac 100644 (file)
@@ -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;
 }
index 6cfce305a04ab0a8bf5a9c70c10f7ce0e9effdbe..b5240faed09fe5b517548267484eb25bc6f6feaa 100644 (file)
@@ -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. */
index f46405dceabfbbede4228eb155a1b99c35561b93..180823b791a1df09ffb665d937659a48015af51f 100644 (file)
@@ -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,                              \
index f10f2f447060aa19e3d88cf4779b3317154b84e8..8e66aa55b69fd4a929a5ed37ee07f776f274768a 100644 (file)
@@ -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
 }
index 87d1a6c69150a75082e81f745cdbbedf8fbd6c90..9be2d645fde0d89d2db6972b0ecb31cf2c4cc06d 100644 (file)
@@ -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);
index 08d49dee754aeb1b4e8f6e920358f0763f9fa050..36e9c8f36dca23ff776cd91d4ce967b080b104bb 100644 (file)
@@ -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); \
index 4abc57ca1c91df3ee1dcb843004fc4b83dd8e9d5..35869c44b87ae9d2810c15f847065e189760b2d2 100644 (file)
@@ -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 */
index cd97fcf432ebac69920ae1693405491ce6119d07..c75a748574c18b2802410136dc396ecdb6f7aec1 100644 (file)
@@ -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])
 {
index c2bded42bc184aaa28e6988bdde1fb7d4d273724..d4adc78f3341f65bae14f9094f98e705df6965e8 100644 (file)
@@ -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;
index cb0d394bd0bc261cb4723c077f1eb539cfcf0992..5e93039c39c8a4d45e440785f6846ddf5e92c1a0 100644 (file)
@@ -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); \
index 960fb3b417c47d5ccd0697118926a629a94b64a6..4173bb9d99afdef3aa1f7e2f524382f43a3ed3f2 100644 (file)
@@ -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);
index 502b33a2b4a3ca4a5d99313af85182c1b10266ca..025bfc5556906df422a4ef2426a13c5562569a36 100644 (file)
@@ -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);
index 32fc7a301a40bd612e277f4237c634f7cb567f09..ce4508461efd2c31765d49d739c119fd0b4f21a8 100644 (file)
@@ -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
index 9de01bf140b718b346f455dc80d27db04ca3a059..e276fcd63cea2c5754a70f144e5072613a5d2866 100644 (file)
@@ -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)
 {
index d5c322356d8c11cce4edff00f23be795145475c1..812af1c6ac08212182e390c5aa0c99848f376472 100644 (file)
@@ -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)
 {
index 07be0ad750d855ee3f62a1086c77ddbbaf2a7cdd..e563fa8b9cef4d793bc766ffc57a617d6031ae1f 100644 (file)
@@ -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");
index 860dd72880531aa7a58b9386eb10f8a36de4e678..8af74ec745142291ab8bb30019d7d46e67368736 100644 (file)
@@ -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) && \
index 5c505f1b234309ce839f38b880657ecb8bddd38a..3d4618021e861f6ee05a7b486079115532460577 100644 (file)
@@ -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)
 
 
 
index 09625b9b47eefb667787c91a0b7d99c6c1c8367d..03566de01d2ed970c241873075a64592f62c0435 100644 (file)
@@ -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 ****************************** */
index cdbbcf9ec2b02b17a6f44b11a8dd51e36fba0b19..f369048ec2fe389b4cfa8ec2bbc2ab3e22c357be 100644 (file)
@@ -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)
 {
index 44ec9926d59905f38791dc67a816bcb7affb30f0..66b5ec22af9ce6fb0f6be4da001bdc72bfc7acc7 100644 (file)
@@ -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).
index 71bf37b4e7a4e9c7ce31ac3f580cec17563eb631..b907452dad2e97e13dd521455ae926db323a395f 100644 (file)
@@ -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};
index 8c6ea162adca183dcaa67138d5c8b28dd3e5617c..a1741c7e96708ce5fd1c32eff9321fca7f35b3de 100644 (file)
@@ -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. */
index 9ea76deed3a420237b7a1075c9507c88754dbd97..3db167fc1fd92706ec15cc9c86f2ce41418d92d7 100644 (file)
@@ -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 */
index 3cb3d28a29cd9b77974435e1d50ade49b4eb575d..563d126788594b214e6b80938d8462866be45a84 100644 (file)
@@ -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);
 
index f4f4c6425c29f5afe6945acf575bab2310fdab84..45b7b37eb8d226f597298e38fa154854327e07da 100644 (file)
@@ -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;
index cb58542dc38a2ae96bac49945c05add85d2df8de..df40422e1c1965f6d2ecad6ff5efe5539aea0563 100644 (file)
@@ -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) };
index bde6bd30b7654f65a7afb9c1c370617916f8727b..f657177370624a8a6f2c4dc06dda848711eaf301 100644 (file)
@@ -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);
index 99b634ddfcc8363a36a268a173e08cf52b3d4400..6dccc55d3ffa37ee8640a1121a00113669aec219 100644 (file)
@@ -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 -------- */
index 96086b21ab2af1be0c648de6ea16f390990fe59a..dcfeaf64699d8a37f3c69e5dc7a5a7afa4e6c424 100644 (file)
@@ -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 */
index 68a2f382278e70f776fc0841c3dc95a08127a38f..3a4f9d461ecf41199db7d256b70609ebb9f4a432 100644 (file)
@@ -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);
index 42c5c2b3576312b62535fb7eb545278e9d1c5889..9269c25f54b359462f552c1aa61dbc4068049855 100644 (file)
@@ -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));
index c226ad7a47f2dc8b0657d18edb10c948fe0f6b5d..e8552c823bf31fcf58b1f0e3f947c317cb38ede2 100644 (file)
@@ -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;
index aa9c462d74e7cb536c73c3a4b6636c4bc88279c7..8b8dff9dc27294f8cc57a8c15d055ea37d2eaaa1 100644 (file)
@@ -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,
index 62ecfdbc59d6d9e445d3835d6b1616b850f510c1..ea3657b87292f805d5f553e3dda551f126cce9c5 100644 (file)
@@ -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;
index b8c2c461f9bbe80a93918e36d426d2f885895c5d..a4247ec370de9f814b08a6fedc35c1e528a25779 100644 (file)
@@ -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");
index 5398db82586aeae9f2d2501bc740612a3952bff5..8aafe349be8aacc23ac6c63236cbd746a934cf47 100644 (file)
@@ -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)
 {
index cc6d99e2a90eab105568143089cb111a8ba02360..5bed5b28b14d394c5291cfe90b7a8c8559a3d3fd 100644 (file)
@@ -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;
index 5866302a8524a5b8b64659e9350a13b910a8d556..70194d71e26bfd77d580291c7a2e317e1fcfed06 100644 (file)
@@ -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);
index 1c16abcd12f02bf990a5953d1fe2ee517c7f2f48..4440cd2313c9cb0b8bc9b641edc28eb652701039 100644 (file)
@@ -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;