aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2020-06-21 10:24:43 +0200
committerMattias Andrée <maandree@kth.se>2020-06-21 10:24:43 +0200
commit29e861a1ed5408648bcceea5db52c15b3949097f (patch)
tree09a73af9ffd8674304720cb6f58970b9717d7a5f
parent#define SIGCLD if missing, needed for musl (diff)
downloadsctrace-29e861a1ed5408648bcceea5db52c15b3949097f.tar.gz
sctrace-29e861a1ed5408648bcceea5db52c15b3949097f.tar.bz2
sctrace-29e861a1ed5408648bcceea5db52c15b3949097f.tar.xz
Add string parameter to _Static_assert use, required by C11
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--print.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/print.c b/print.c
index 95a324a..e74fad8 100644
--- a/print.c
+++ b/print.c
@@ -32,7 +32,7 @@
#define FLAG(FLAG)\
do {\
- _Static_assert((FLAG) != 0);\
+ _Static_assert((FLAG) != 0, #FLAG" is 0 and must not be included");\
if (flags & (FLAG)) {\
p = stpcpy(p, "|"#FLAG);\
flags ^= (FLAG);\
@@ -46,7 +46,7 @@
} while (0)
#define FLAGS_END_DEFAULT(FLAG)\
- _Static_assert((FLAG) == 0);\
+ _Static_assert((FLAG) == 0, #FLAG" is not 0 and cannot be the default");\
if (!flags && !*buf)\
sprintf(p, "|%s", #FLAG);\
else if (flags || !*buf)\