Skip to content

Commit 7d8cd91

Browse files
tianhuaswenlingz
authored andcommitted
security: remove gcc flags Wformat Wformat-security in HV
We have used the option --ffreestanding to assert hypervisor is a freestanding environment, and hypervisor does not include standard library. "-Wformat/-Wformat-security" Check calls to the standard library functions printf and scanf, etc., to make sure that the arguments supplied have types appropriate to the format string specified, and that the conversions specified in the format string make sense. these flags disabled by -ffreestanding or -fno-builtin. Tracked-On: #1122 Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com> Reviewed-by: Yin Fengwei <fengwei.yin@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
1 parent d133f95 commit 7d8cd91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hypervisor/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ CFLAGS += -fsigned-char
5151
CFLAGS += -m64 -mno-mmx -mno-sse -mno-sse2 -mno-80387 -mno-fp-ret-in-387
5252
CFLAGS += -mno-red-zone
5353
CFLAGS += -nostdinc -nostdlib -fno-common
54-
CFLAGS += -Wformat -Wformat-security -Werror
54+
CFLAGS += -Werror
5555
ifeq (y, $(CONFIG_RELOC))
5656
CFLAGS += -fpie
5757
else

0 commit comments

Comments
 (0)