Skip to content

Commit fd83260

Browse files
committed
Remove semicolons from macro expansions
This is almost never what's wanted since the user of the macro will naturally add the semicolon: > src/pool/pool_disjoint.c:55:69: warning: > ISO C does not allow extra ‘;’ outside of a function [-Wpedantic] > static const struct ctl_argument CTL_ARG(name) = CTL_ARG_STRING(255);
1 parent 57d930a commit fd83260

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ctl/ctl_internal.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,11 @@ void ctl_register_module_node(struct ctl *c, const char *name,
127127

128128
int ctl_arg_boolean(const void *arg, void *dest, size_t dest_size);
129129
#define CTL_ARG_BOOLEAN \
130-
{sizeof(int), {{0, sizeof(int), ctl_arg_boolean}, CTL_ARG_PARSER_END}};
130+
{sizeof(int), {{0, sizeof(int), ctl_arg_boolean}, CTL_ARG_PARSER_END}}
131131

132132
int ctl_arg_integer(const void *arg, void *dest, size_t dest_size);
133133
#define CTL_ARG_INT \
134-
{sizeof(int), {{0, sizeof(int), ctl_arg_integer}, CTL_ARG_PARSER_END}};
134+
{sizeof(int), {{0, sizeof(int), ctl_arg_integer}, CTL_ARG_PARSER_END}}
135135

136136
#define CTL_ARG_LONG_LONG \
137137
{ \
@@ -142,7 +142,7 @@ int ctl_arg_integer(const void *arg, void *dest, size_t dest_size);
142142

143143
int ctl_arg_string(const void *arg, void *dest, size_t dest_size);
144144
#define CTL_ARG_STRING(len) \
145-
{len, {{0, len, ctl_arg_string}, CTL_ARG_PARSER_END}};
145+
{len, {{0, len, ctl_arg_string}, CTL_ARG_PARSER_END}}
146146

147147
#define CTL_STR(name) #name
148148

0 commit comments

Comments
 (0)