aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2023-08-01 13:36:45 +1000
committerStefano Brivio <sbrivio@redhat.com>2023-08-04 01:17:41 +0200
commit649068a287b2b559f83b6d255c66221991d68327 (patch)
tree2f549bc40fe99950e5fc8e70b59ab8a5060651e5
parent023d68442020c303a8cb4a873ccef7fcd16f3ebe (diff)
downloadpasst-649068a287b2b559f83b6d255c66221991d68327.tar
passt-649068a287b2b559f83b6d255c66221991d68327.tar.gz
passt-649068a287b2b559f83b6d255c66221991d68327.tar.bz2
passt-649068a287b2b559f83b6d255c66221991d68327.tar.lz
passt-649068a287b2b559f83b6d255c66221991d68327.tar.xz
passt-649068a287b2b559f83b6d255c66221991d68327.tar.zst
passt-649068a287b2b559f83b6d255c66221991d68327.zip
Allow C11 code, not just C99 code
C11 has some features that will allow us to make some things a bit cleaner. Alter the Makefile to tell the compiler to allow us to use C11 code. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a5256f5..4435bd6 100644
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,7 @@ AUDIT_ARCH := $(shell echo $(AUDIT_ARCH) | sed 's/MIPS64EL/MIPSEL64/')
AUDIT_ARCH := $(shell echo $(AUDIT_ARCH) | sed 's/HPPA/PARISC/')
AUDIT_ARCH := $(shell echo $(AUDIT_ARCH) | sed 's/SH4/SH/')
-FLAGS := -Wall -Wextra -pedantic -std=c99 -D_XOPEN_SOURCE=700 -D_GNU_SOURCE
+FLAGS := -Wall -Wextra -pedantic -std=c11 -D_XOPEN_SOURCE=700 -D_GNU_SOURCE
FLAGS += -D_FORTIFY_SOURCE=2 -O2 -pie -fPIE
FLAGS += -DPAGE_SIZE=$(shell getconf PAGE_SIZE)
FLAGS += -DNETNS_RUN_DIR=\"/run/netns\"
@@ -284,7 +284,7 @@ VER := $(shell $(CC) -dumpversion)
SYSTEM_INCLUDES += /usr/lib/gcc/$(TARGET)/$(VER)/include
endif
cppcheck: $(SRCS) $(HEADERS)
- cppcheck --std=c99 --error-exitcode=1 --enable=all --force \
+ cppcheck --std=c11 --error-exitcode=1 --enable=all --force \
--inconclusive --library=posix --quiet \
$(SYSTEM_INCLUDES:%=-I%) \
$(SYSTEM_INCLUDES:%=--config-exclude=%) \