client: check PrintAndLogEx format strings at compile time
Add a printf format attribute to PrintAndLogEx so gcc/clang flag argument/specifier mismatches (previous commit fixed the 34 existing ones). On mingw use __MINGW_PRINTF_FORMAT, matching the GNU printf selected by _ISOC99_SOURCE rather than ms_printf. PrintAndLogEx(x, "") is the established way to print an empty line, so -Wno-format-zero-length is added to every build that compiles callers: client Makefile, client CMake, experimental_lib, and cliparser (Makefile and cmake). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3deae3d904
commit
cc50ed6b72
6 files changed
+14
-5
No files matched your search
@@ -9,5 +9,5 @@ target_include_directories(pm3rrg_rdv4_cliparser PRIVATE
|
||||
../../include
|
||||
../src)
|
||||
target_include_directories(pm3rrg_rdv4_cliparser INTERFACE cliparser)
|
||||
target_compile_options(pm3rrg_rdv4_cliparser PRIVATE -Wall -Werror -O3)
|
||||
target_compile_options(pm3rrg_rdv4_cliparser PRIVATE -Wall -Werror -Wno-format-zero-length -O3)
|
||||
set_property(TARGET pm3rrg_rdv4_cliparser PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
@@ -1,6 +1,6 @@
|
||||
MYSRCPATHS =
|
||||
MYINCLUDES = -I../../../common -I../../../include -I../../src
|
||||
MYCFLAGS = -Wno-cast-align
|
||||
MYCFLAGS = -Wno-cast-align -Wno-format-zero-length
|
||||
MYDEFS =
|
||||
MYSRCS = \
|
||||
argtable3.c \
|
||||
|
||||
Reference in new issue
Block a user