Skip to content

Commit 02a7efc

Browse files
Makefile: add -Werror=discarded-qualifiers to the C flags
Because C allows this: void f(int *x); void g(const int *x) { f(x); } Signed-off-by: Thiago Macieira <[email protected]>
1 parent 5f26eaf commit 02a7efc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ cflags += -std=gnu99 $(CFLAGS)
240240

241241
ifneq ($(DISABLE_WERROR),1)
242242
cflags += \
243+
-Werror=discarded-qualifiers \
243244
-Werror=incompatible-pointer-types \
244245
-Werror=implicit-function-declaration \
245246
-Werror=int-conversion

0 commit comments

Comments
 (0)