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
@@ -720,7 +720,7 @@ add_library(pm3rrg_rdv4_static STATIC
|
||||
set(PM3_LIBRARY_TARGETS pm3rrg_rdv4 pm3rrg_rdv4_static)
|
||||
foreach (target IN LISTS PM3_LIBRARY_TARGETS)
|
||||
target_compile_definitions(${target} PRIVATE LIBPM3)
|
||||
target_compile_options(${target} PUBLIC -Wall -Werror -O3)
|
||||
target_compile_options(${target} PUBLIC -Wall -Werror -Wno-format-zero-length -O3)
|
||||
target_include_directories(${target} PRIVATE
|
||||
${PM3_ROOT}/common
|
||||
${PM3_ROOT}/common_fpga
|
||||
|
||||
Reference in new issue
Block a user