core: drop unnecessary __useless_struct_to_allow_trailing_semicolon__

ISO C does not allow empty statements outside of functions, and gcc
will warn the trailing semicolons when compiling with -pedantic:

  warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]

But our code cannot compile with -pedantic anyway, at least because

  warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic]

Without -pedatnic, clang and even old gcc (3.4) generate no warnings about
those semicolons, so let's just drop __useless_struct_to_allow_trailing_semicolon__.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2018-03-06 10:41:41 +01:00
parent eef03d70c1
commit f6a8265b9a
8 changed files with 21 additions and 43 deletions
+2 -4
View File
@@ -91,8 +91,7 @@ int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) {
return bus_log_create_error(r); \
\
return 1; \
} \
struct __useless_struct_to_allow_trailing_semicolon__
}
#define DEFINE_BUS_APPEND_PARSE(bus_type, parse_func) \
static int bus_append_##parse_func( \
@@ -113,8 +112,7 @@ int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) {
return bus_log_create_error(r); \
\
return 1; \
} \
struct __useless_struct_to_allow_trailing_semicolon__
}
DEFINE_BUS_APPEND_PARSE("b", parse_boolean);
DEFINE_BUS_APPEND_PARSE("i", ioprio_class_from_string);