Add -Wsuggest-attribute=format warning, correct warnings thus generated

Add this new warning to the default build flags.  It suggests adding
a ((format)) attribute to xavsprintf_append(), so do that.

Suggested-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
David Gibson 2023-02-27 19:13:13 +11:00
parent 4182182110
commit e3cde0613b
3 changed files with 5 additions and 3 deletions

View file

@ -22,7 +22,8 @@ ASSUME_MASK ?= 0
CPPFLAGS = -I libfdt -I . -DFDT_ASSUME_MASK=$(ASSUME_MASK)
WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs -Wsign-compare \
-Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow
-Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow \
-Wsuggest-attribute=format
CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS)
BISON = bison