Cleanup: ensure '_END' macros end with a semicolon
authorCampbell Barton <ideasman42@gmail.com>
Fri, 30 Nov 2018 04:35:15 +0000 (15:35 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 30 Nov 2018 04:35:15 +0000 (15:35 +1100)
Missing these breaks auto-indent for editors that don't expand macros.

23 files changed:
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/BKE_sequencer.h
source/blender/blenkernel/intern/bpath.c
source/blender/blenkernel/intern/ipo.c
source/blender/blenkernel/intern/library_query.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/versioning_250.c
source/blender/blenloader/intern/versioning_260.c
source/blender/blenloader/intern/versioning_270.c
source/blender/blenloader/intern/versioning_legacy.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/sound/sound_ops.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_templates.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_sequencer/sequencer_modifier.c
source/blender/editors/space_sequencer/sequencer_select.c
source/blender/imbuf/intern/colormanagement.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/rna_nodetree.c

index 852285492d225150a8600455ce08b10f3ca39bb8..3d78b95001d64398a2846fe772901dc5cb309e73 100644 (file)
@@ -413,7 +413,7 @@ struct GHashIterator *nodeTypeGetIterator(void);
 #define NODE_TYPES_END \
        } \
        BLI_ghashIterator_free(__node_type_iter__); \
-}
+} ((void)0)
 
 struct bNodeSocketType *nodeSocketTypeFind(const char *idname);
 void                   nodeRegisterSocketType(struct bNodeSocketType *stype);
index c408597de3244f927c60d7a6f15d3a7accbf8677..705143480d246f473246656efd86c3ef2e2dee4c 100644 (file)
@@ -89,7 +89,7 @@ void BKE_sequence_iterator_end(SeqIterator *iter);
 #define SEQ_END                                                               \
                }                                                                     \
                BKE_sequence_iterator_end(&iter_macro);                               \
-       }
+       } ((void)0)
 
 typedef struct SeqRenderData {
        struct EvaluationContext *eval_ctx;
index 0b191e1f69b22459374fe175322c0a0712e7989b..f80a13343d5e09648172ed1706392c8e47778090 100644 (file)
@@ -631,9 +631,7 @@ void BKE_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int
                                                        rewrite_path_fixed(seq->strip->dir, visit_cb, absbase, bpath_user_data);
                                                }
                                        }
-
-                               }
-                               SEQ_END
+                               } SEQ_END;
                        }
                        break;
                }
index c11f2368197a8bf4f4528433f98401b988a46c01..effbff37c33ce37aab286460817b3cf5e6a05925 100644 (file)
@@ -1976,8 +1976,7 @@ void do_versions_ipos_to_animato(Main *bmain)
 
                                id_us_min(&seq->ipo->id);
                                seq->ipo = NULL;
-                       }
-                       SEQ_END
+                       } SEQ_END;
                }
        }
 
index 3292f0d6640a4af7cdefecc444245d732e3227e2..f5367f6f8b3dde1572f40fd845a1b3f89189a120 100644 (file)
@@ -455,8 +455,7 @@ void BKE_library_foreach_ID_link(Main *bmain, ID *id, LibraryIDLinkCallback call
                                                for (SequenceModifierData *smd = seq->modifiers.first; smd; smd = smd->next) {
                                                        CALLBACK_INVOKE(smd->mask_id, IDWALK_CB_USER);
                                                }
-                                       }
-                                       SEQ_END
+                                       } SEQ_END;
                                }
 
                                CALLBACK_INVOKE(scene->gpd, IDWALK_CB_USER);
index 82f619da9c6bc7391b571a4cc8f4b028925ecb30..2946fb29863672e0cd65f48fe3a723c0996ced3d 100644 (file)
@@ -918,7 +918,7 @@ bNode *nodeAddStaticNode(const struct bContext *C, bNodeTree *ntree, int type)
 {
        const char *idname = NULL;
 
-       NODE_TYPES_BEGIN(ntype)
+       NODE_TYPES_BEGIN(ntype) {
                /* do an extra poll here, because some int types are used
                 * for multiple node types, this helps find the desired type
                 */
@@ -926,7 +926,7 @@ bNode *nodeAddStaticNode(const struct bContext *C, bNodeTree *ntree, int type)
                        idname = ntype->idname;
                        break;
                }
-       NODE_TYPES_END
+       } NODE_TYPES_END;
        if (!idname) {
                printf("Error: static node type %d undefined\n", type);
                return NULL;
@@ -3732,23 +3732,23 @@ void init_nodesystem(void)
 void free_nodesystem(void)
 {
        if (nodetypes_hash) {
-               NODE_TYPES_BEGIN(nt)
+               NODE_TYPES_BEGIN(nt) {
                        if (nt->ext.free) {
                                nt->ext.free(nt->ext.data);
                        }
-               NODE_TYPES_END
+               } NODE_TYPES_END;
 
                BLI_ghash_free(nodetypes_hash, NULL, node_free_type);
                nodetypes_hash = NULL;
        }
 
        if (nodesockettypes_hash) {
-               NODE_SOCKET_TYPES_BEGIN(st)
+               NODE_SOCKET_TYPES_BEGIN(st) {
                        if (st->ext_socket.free)
                                st->ext_socket.free(st->ext_socket.data);
                        if (st->ext_interface.free)
                                st->ext_interface.free(st->ext_interface.data);
-               NODE_SOCKET_TYPES_END
+               } NODE_SOCKET_TYPES_END;
 
                BLI_ghash_free(nodesockettypes_hash, NULL, node_free_socket_type);
                nodesockettypes_hash = NULL;
index c2a96d4f1ffbcf768cfce8bbbd86a396c410258c..57b3cd41047cf81af8028737c29167d566971efe 100644 (file)
@@ -469,8 +469,7 @@ void BKE_sequencer_editing_free(Scene *scene, const bool do_id_user)
        {
                /* handle cache freeing above */
                BKE_sequence_free_ex(scene, seq, false, do_id_user);
-       }
-       SEQ_END
+       } SEQ_END;
 
        BLI_freelistN(&ed->metastack);
 
index ead3b324644f039bd23ad1e554688573ba742980..57d4978c776feb7392481b7f6d3d16c1d90bff2c 100644 (file)
@@ -5867,8 +5867,7 @@ static void lib_link_scene(FileData *fd, Main *main)
                                BLI_listbase_clear(&seq->anims);
 
                                lib_link_sequence_modifiers(fd, sce, &seq->modifiers);
-                       }
-                       SEQ_END
+                       } SEQ_END;
 
                        for (TimeMarker *marker = sce->markers.first; marker; marker = marker->next) {
                                if (marker->camera) {
@@ -6162,8 +6161,7 @@ static void direct_link_scene(FileData *fd, Scene *sce)
                        }
 
                        direct_link_sequence_modifiers(fd, &seq->modifiers);
-               }
-               SEQ_END
+               } SEQ_END;
 
                /* link metastack, slight abuse of structs here, have to restore pointer to internal part in struct */
                {
@@ -9744,8 +9742,7 @@ static void expand_scene(FileData *fd, Main *mainvar, Scene *sce)
                        if (seq->clip) expand_doit(fd, mainvar, seq->clip);
                        if (seq->mask) expand_doit(fd, mainvar, seq->mask);
                        if (seq->sound) expand_doit(fd, mainvar, seq->sound);
-               }
-               SEQ_END
+               } SEQ_END;
        }
 
        if (sce->rigidbody_world) {
index 835acbc853d935ffe192e070929f04dcfc997d26..a6d8b6de60652e4a52b7ecd1dc04f8301b3c0c29 100644 (file)
@@ -793,8 +793,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
                                        }
 #undef SEQ_USE_PROXY_CUSTOM_DIR
 #undef SEQ_USE_PROXY_CUSTOM_FILE
-                               }
-                               SEQ_END
+                               } SEQ_END;
                        }
                }
 
@@ -1758,8 +1757,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
                        SEQ_BEGIN (sce->ed, seq)
                        {
                                seq->volume = 1.0f;
-                       }
-                       SEQ_END
+                       } SEQ_END;
                }
 
                /* particle brush strength factor was changed from int to float */
@@ -2034,8 +2032,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
                                        if (seq->sat == 0.0f) {
                                                seq->sat = 1.0f;
                                        }
-                               }
-                               SEQ_END
+                               } SEQ_END;
                        }
                }
 
@@ -2580,8 +2577,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
                                SEQ_BEGIN(scene->ed, seq)
                                {
                                        seq->pitch = 1.0f;
-                               }
-                               SEQ_END
+                               } SEQ_END;
                        }
                }
 
index f630dbe1aaf95ab82edd71b87519c6302023f2d5..af291981e7f759d7c461f409539037b489022f47 100644 (file)
@@ -1520,8 +1520,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
                                                MEM_freeN(strip->color_balance);
                                                strip->color_balance = NULL;
                                        }
-                               }
-                               SEQ_END
+                               } SEQ_END;
                        }
                }
        }
@@ -1880,8 +1879,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
                                else {
                                        BKE_sequence_alpha_mode_from_extension(seq);
                                }
-                       }
-                       SEQ_END
+                       } SEQ_END;
 
                        if (scene->r.bake_samples == 0)
                                scene->r.bake_samples = 256;
@@ -2586,8 +2584,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
                                                WipeVars *wv = seq->effectdata;
                                                wv->angle = DEG2RADF(wv->angle);
                                        }
-                               }
-                               SEQ_END
+                               } SEQ_END;
                        }
 
                        FOREACH_NODETREE_BEGIN(bmain, ntree, id) {
index 64c6cc9a0526548b421a3ee36ea0d9dcf61fc962..7884a628147eabad54d005c42f907b3dcb6a9de4 100644 (file)
@@ -940,8 +940,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain)
 #undef SEQ_USE_PROXY_CUSTOM_DIR
 #undef SEQ_USE_PROXY_CUSTOM_FILE
 
-                       }
-                       SEQ_END
+                       } SEQ_END;
                }
 
                for (screen = bmain->screen.first; screen; screen = screen->id.next) {
@@ -1325,8 +1324,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain)
                                        copy_v4_fl(data->color, 1.0f);
                                        data->shadow_color[3] = 1.0f;
                                }
-                       }
-                       SEQ_END
+                       } SEQ_END;
                }
 
                /* Adding "Properties" region to DopeSheet */
index 48d90787b517bd856035a9a7400c3aa36c4bd0d3..9708e24b351d2a3c9c24124eecbe8add8a9b3bfa 100644 (file)
@@ -1816,8 +1816,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
                                {
                                        if (seq->type == SEQ_TYPE_IMAGE || seq->type == SEQ_TYPE_MOVIE)
                                                seq->alpha_mode = SEQ_ALPHA_STRAIGHT;
-                               }
-                               SEQ_END
+                               } SEQ_END;
                        }
 
                        sce = sce->id.next;
@@ -3184,8 +3183,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
                        {
                                if (seq->blend_mode == 0)
                                        seq->blend_opacity = 100.0f;
-                       }
-                       SEQ_END
+                       } SEQ_END;
                }
        }
 
@@ -3540,8 +3538,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
                                        if (seq->strip && seq->strip->proxy) {
                                                seq->strip->proxy->quality = 90;
                                        }
-                               }
-                               SEQ_END
+                               } SEQ_END;
                        }
 
                        sce = sce->id.next;
index 2283928b1a86f680ebe5e9344107f2edc5e5543e..4f48318582a4ec7e62f04d356221aa86d665ea3f 100644 (file)
@@ -2565,8 +2565,7 @@ static void write_scene(WriteData *wd, Scene *sce)
                                seq->strip->done = false;
                        }
                        writestruct(wd, DATA, Sequence, 1, seq);
-               }
-               SEQ_END
+               } SEQ_END;
 
                SEQ_BEGIN(ed, seq)
                {
@@ -2632,8 +2631,7 @@ static void write_scene(WriteData *wd, Scene *sce)
                        }
 
                        write_sequence_modifiers(wd, &seq->modifiers);
-               }
-               SEQ_END
+               } SEQ_END;
 
                /* new; meta stack too, even when its nasty restore code */
                for (MetaStack *ms = ed->metastack.first; ms; ms = ms->next) {
index b605bd6e1a737c5fd4cc2d0932514db7d00cd6a8..832505c228164230350e1c0ebb8ae087291e9bf1 100644 (file)
@@ -267,8 +267,7 @@ static void sound_update_animation_flags(Scene *scene)
        SEQ_BEGIN(scene->ed, seq)
        {
                BKE_sequencer_recursive_apply(seq, sound_update_animation_flags_cb, scene);
-       }
-       SEQ_END
+       } SEQ_END;
 
        fcu = id_data_find_fcurve(&scene->id, scene, &RNA_Scene, "audio_volume", 0, &driven);
        if (fcu || driven)
index 561b7b99d591d2f8ccd58b36d11b504232319ea7..df303a7bf11504a1fa804aebd3c38bad57245b5d 100644 (file)
@@ -1134,7 +1134,7 @@ static void image_sequence_get_frame_ranges(PointerRNA *ptr, ListBase *frames_al
                BLI_addtail(&frame_range->frames, frame);
                MEM_freeN(filename);
        }
-       RNA_END
+       RNA_END;
 }
 
 static int image_cmp_frame(const void *a, const void *b)
index 46172da6b047ff1ddd3055b384c890a177a5094e..0dc057e754b99c39606f5596dc0d0e31ac485a15 100644 (file)
@@ -3057,7 +3057,7 @@ void ED_node_init_butfuncs(void)
        NodeSocketTypeUndefined.interface_draw_color = node_socket_undefined_interface_draw_color;
 
        /* node type ui functions */
-       NODE_TYPES_BEGIN(ntype)
+       NODE_TYPES_BEGIN(ntype) {
                /* default ui functions */
                ntype->draw_nodetype = node_draw_default;
                ntype->draw_nodetype_prepare = node_update_default;
@@ -3075,7 +3075,7 @@ void ED_node_init_butfuncs(void)
 
                /* define update callbacks for socket properties */
                node_template_properties_update(ntype);
-       NODE_TYPES_END
+       } NODE_TYPES_END;
 
        /* tree type icons */
        ntreeType_Composite->ui_icon = ICON_RENDERLAYERS;
index c45a5c650ee0f7f1675fc36c734c47d511cc9063..6995744f235570e12c2fce877b2e06d29eeaf08e 100644 (file)
@@ -473,8 +473,7 @@ static void ui_node_menu_column(NodeLinkArg *arg, int nclass, const char *cname)
                }
 
                BLI_array_append(sorted_ntypes, ntype);
-       }
-       NODE_TYPES_END
+       } NODE_TYPES_END;
 
        qsort(sorted_ntypes, BLI_array_len(sorted_ntypes), sizeof(bNodeType *), ui_node_item_name_compare);
 
index 04cb5c7a37cadbdcdf041576be83a08fe8443cf3..d9cc7cb2c361e527e281973256930033aa808ef4 100644 (file)
@@ -217,8 +217,7 @@ static void seq_proxy_build_job(const bContext *C)
                if ((seq->flag & SELECT)) {
                        BKE_sequencer_proxy_rebuild_context(pj->main, pj->scene, seq, file_list, &pj->queue);
                }
-       }
-       SEQ_END
+       } SEQ_END;
 
        BLI_gset_free(file_list, MEM_freeN);
 
@@ -455,8 +454,7 @@ void ED_sequencer_deselect_all(Scene *scene)
        SEQP_BEGIN (ed, seq)
        {
                seq->flag &= ~SEQ_ALLSEL;
-       }
-       SEQ_END
+       } SEQ_END;
 
 }
 
@@ -645,8 +643,7 @@ static void del_seq_clear_modifiers_recurs(Scene *scene, Sequence *deleting_sequ
                                }
                        }
                }
-       }
-       SEQ_END
+       } SEQ_END;
 }
 
 static void recurs_del_seq_flag(Scene *scene, ListBase *lb, short flag, short deleteall)
@@ -993,8 +990,7 @@ static void set_filter_seq(Scene *scene)
                        }
 
                }
-       }
-       SEQ_END
+       } SEQ_END;
 }
 #endif
 
@@ -1034,8 +1030,7 @@ static void UNUSED_FUNCTION(seq_remap_paths) (Scene *scene)
                                printf("new %s\n", seq->strip->dir);
                        }
                }
-       }
-       SEQ_END
+       } SEQ_END;
 
 }
 
@@ -3518,8 +3513,7 @@ static int sequencer_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op))
                        }
                        BKE_sequencer_free_imbuf(scene, &ed->seqbase, false);
                }
-       }
-       SEQ_END
+       } SEQ_END;
 
        BLI_gset_free(file_list, MEM_freeN);
 
@@ -3597,8 +3591,7 @@ static int sequencer_enable_proxies_exec(bContext *C, wmOperator *op)
                                        seq->strip->proxy->build_flags &= ~SEQ_PROXY_SKIP_EXISTING;
                        }
                }
-       }
-       SEQ_END
+       } SEQ_END;
 
        WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
 
@@ -3946,8 +3939,7 @@ static int sequencer_export_subtitles_exec(bContext *C, wmOperator *op)
                if (seq->type == SEQ_TYPE_TEXT) {
                        BLI_addtail(&text_seq, MEM_dupallocN(seq));
                }
-       }
-       SEQ_END
+       } SEQ_END;
 
        if (BLI_listbase_is_empty(&text_seq)) {
                BKE_report(op->reports, RPT_ERROR, "No subtitles (text strips) to export");
index 3c4481b32cbf6b7128490eb4af8d86722c3adf00..1b2357ef6a5708992f4d65073cb7eec3997b2a02 100644 (file)
@@ -247,8 +247,7 @@ static int strip_modifier_copy_exec(bContext *C, wmOperator *op)
 
                        BKE_sequence_modifier_list_copy(seq_iter, seq);
                }
-       }
-       SEQ_END
+       } SEQ_END;
 
        BKE_sequence_invalidate_cache(scene, seq);
        WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
index e01c79943292eef93ce1ca95e6050b969a36a202..1a9ef7970a4d2b082c2cb88af083d9762a3a2c03 100644 (file)
@@ -381,8 +381,8 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, const wmEvent *e
                                seq->flag |= SELECT;
                                recurs_sel_seq(seq);
                        }
-               }
-               SEQ_END
+               } SEQ_END;
+
                {
                        SpaceSeq *sseq = CTX_wm_space_seq(C);
                        if (sseq && sseq->flag & SEQ_MARKER_TRANS) {
index 1d287025a4e751d2fff3844e65295fc801609bc3..86c4156ad8bfb5dfa23b3c891505fe1695fdc77f 100644 (file)
@@ -1133,8 +1133,7 @@ void IMB_colormanagement_check_file_config(Main *bmain)
                        if (seq->strip) {
                                colormanage_check_colorspace_settings(&seq->strip->colorspace_settings, "sequencer strip");
                        }
-               }
-               SEQ_END
+               } SEQ_END;
        }
 
        /* ** check input color space settings ** */
index a026d8e875ee3badde8526e471f34f6a354ba90f..de46605bc4067006059f9d4937f67ab0ca611da1 100644 (file)
@@ -1091,7 +1091,7 @@ void RNA_collection_clear(PointerRNA *ptr, const char *name);
 #define RNA_END                                                               \
                }                                                                     \
                RNA_property_collection_end(&rna_macro_iter);                         \
-       }
+       } ((void)0)
 
 #define RNA_PROP_BEGIN(sptr, itemptr, prop)                                   \
        {                                                                         \
index 68f0272c035f4352ba54982111bb511e77c6537c..abb88a44b4c929b9a72bc2f586dbce565e281ed5 100644 (file)
@@ -287,26 +287,26 @@ const EnumPropertyItem *rna_node_tree_type_itemf(void *data, bool (*poll)(void *
 int rna_node_type_to_enum(bNodeType *typeinfo)
 {
        int i = 0, result = -1;
-       NODE_TYPES_BEGIN(ntype)
+       NODE_TYPES_BEGIN(ntype) {
                if (ntype == typeinfo) {
                        result = i;
                        break;
                }
                ++i;
-       NODE_TYPES_END
+       } NODE_TYPES_END;
        return result;
 }
 
 int rna_node_idname_to_enum(const char *idname)
 {
        int i = 0, result = -1;
-       NODE_TYPES_BEGIN(ntype)
+       NODE_TYPES_BEGIN(ntype) {
                if (STREQ(ntype->idname, idname)) {
                        result = i;
                        break;
                }
                ++i;
-       NODE_TYPES_END
+       } NODE_TYPES_END;
        return result;
 }
 
@@ -314,13 +314,13 @@ bNodeType *rna_node_type_from_enum(int value)
 {
        int i = 0;
        bNodeType *result = NULL;
-       NODE_TYPES_BEGIN(ntype)
+       NODE_TYPES_BEGIN(ntype) {
                if (i == value) {
                        result = ntype;
                        break;
                }
                ++i;
-       NODE_TYPES_END
+       } NODE_TYPES_END;
        return result;
 }
 
@@ -330,7 +330,7 @@ const EnumPropertyItem *rna_node_type_itemf(void *data, bool (*poll)(void *data,
        EnumPropertyItem tmp = {0};
        int totitem = 0, i = 0;
 
-       NODE_TYPES_BEGIN(ntype)
+       NODE_TYPES_BEGIN(ntype) {
                if (poll && !poll(data, ntype)) {
                        ++i;
                        continue;
@@ -345,7 +345,7 @@ const EnumPropertyItem *rna_node_type_itemf(void *data, bool (*poll)(void *data,
                RNA_enum_item_add(&item, &totitem, &tmp);
 
                ++i;
-       NODE_TYPES_END
+       } NODE_TYPES_END;
 
        if (totitem == 0) {
                *r_free = false;
@@ -361,26 +361,26 @@ const EnumPropertyItem *rna_node_type_itemf(void *data, bool (*poll)(void *data,
 int rna_node_socket_type_to_enum(bNodeSocketType *typeinfo)
 {
        int i = 0, result = -1;
-       NODE_SOCKET_TYPES_BEGIN(stype)
+       NODE_SOCKET_TYPES_BEGIN(stype) {
                if (stype == typeinfo) {
                        result = i;
                        break;
                }
                ++i;
-       NODE_SOCKET_TYPES_END
+       } NODE_SOCKET_TYPES_END;
        return result;
 }
 
 int rna_node_socket_idname_to_enum(const char *idname)
 {
        int i = 0, result = -1;
-       NODE_SOCKET_TYPES_BEGIN(stype)
+       NODE_SOCKET_TYPES_BEGIN(stype) {
                if (STREQ(stype->idname, idname)) {
                        result = i;
                        break;
                }
                ++i;
-       NODE_SOCKET_TYPES_END
+       } NODE_SOCKET_TYPES_END;
        return result;
 }
 
@@ -388,13 +388,13 @@ bNodeSocketType *rna_node_socket_type_from_enum(int value)
 {
        int i = 0;
        bNodeSocketType *result = NULL;
-       NODE_SOCKET_TYPES_BEGIN(stype)
+       NODE_SOCKET_TYPES_BEGIN(stype) {
                if (i == value) {
                        result = stype;
                        break;
                }
                ++i;
-       NODE_SOCKET_TYPES_END
+       } NODE_SOCKET_TYPES_END;
        return result;
 }
 
@@ -406,7 +406,7 @@ const EnumPropertyItem *rna_node_socket_type_itemf(
        int totitem = 0, i = 0;
        StructRNA *srna;
 
-       NODE_SOCKET_TYPES_BEGIN(stype)
+       NODE_SOCKET_TYPES_BEGIN(stype) {
                if (poll && !poll(data, stype)) {
                        ++i;
                        continue;
@@ -422,7 +422,8 @@ const EnumPropertyItem *rna_node_socket_type_itemf(
                RNA_enum_item_add(&item, &totitem, &tmp);
 
                ++i;
-       NODE_SOCKET_TYPES_END
+       }
+       NODE_SOCKET_TYPES_END;
 
        if (totitem == 0) {
                *r_free = false;