From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 2D4045A0272 for ; Tue, 1 Aug 2023 05:36:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1690861010; bh=nEYe+cJ78951UzBYl+q+LjAHEfL6Q6yp9NuQseoqHUQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ODxWvfm9u/prIvWL2v4icPgFY6EJIa8+mCNvJmMwWAQaPJwPtIWktHPKOOpXWoF2d SyvpMXRwJjpxHJL5EwWSa7E4RnGlSH0rSktasln9XrPoGr4b8ZUp/zFjOLkTAxT7iw e0mfQFUvJnt0F0W2yySY5PgUVIiCr2RJatNz8MXc= Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4RFLPt1vQ8z4wyJ; Tue, 1 Aug 2023 13:36:50 +1000 (AEST) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH 1/3] Allow C11 code, not just C99 code Date: Tue, 1 Aug 2023 13:36:45 +1000 Message-ID: <20230801033647.2135844-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230801033647.2135844-1-david@gibson.dropbear.id.au> References: <20230801033647.2135844-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: HWPJJO6JXD2LWFNMWMDN5JLLNVON6ATZ X-Message-ID-Hash: HWPJJO6JXD2LWFNMWMDN5JLLNVON6ATZ X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- Makefile | 4 ++-- 1 file 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=%) \ -- 2.41.0