From 29e861a1ed5408648bcceea5db52c15b3949097f Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 21 Jun 2020 10:24:43 +0200 Subject: Add string parameter to _Static_assert use, required by C11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- print.c | 4 ++-- 1 file 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)\ -- cgit v1.2.3-70-g09d2