From 21f4cafef5a42e6368d1fcc5222adb6bea2d0b7e Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Fri, 6 Dec 2019 00:32:49 +0100 Subject: [PATCH] Make `-Werror=` with a meta warning an error The previous behavior was to just enable the meta warning's warnings. This is an error now because it doesn't make sense to do that, does it? --- src/asm/warning.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/asm/warning.c b/src/asm/warning.c index 47b9f1a8..fc1429e9 100644 --- a/src/asm/warning.c +++ b/src/asm/warning.c @@ -118,6 +118,9 @@ void processWarningFlag(char const *flag) /* TODO: improve the matching performance? */ if (!strcmp(flag, warningFlags[id])) { /* We got a match! */ + if (setError) + errx(1, "Cannot make meta warning \"%s\" into an error", flag); + uint8_t const *ptr = metaWarningCommands[id - NB_WARNINGS];