mirror of
https://github.com/avrdudes/avrdude.git
synced 2026-09-23 17:46:33 +03:00
Merge pull request #1754 from stefanrueger/no-format-zero-length
Remove gcc warning when printf format is ""
This commit is contained in:
@@ -80,7 +80,7 @@ if(MSVC)
|
||||
list(APPEND EXTRA_WINDOWS_INCLUDES "msvc")
|
||||
else()
|
||||
set(LIB_MATH m)
|
||||
add_compile_options(-Wall -Wextra -Wno-unused-parameter)
|
||||
add_compile_options(-Wall -Wextra -Wno-unused-parameter -Wno-format-zero-length)
|
||||
endif()
|
||||
|
||||
# =====================================
|
||||
|
||||
@@ -46,7 +46,11 @@ extern const char *pgmid; // Programmer -c string
|
||||
#define mmt_realloc(p, n) cfg_realloc(__func__, p, n)
|
||||
#define mmt_free(p) free(p)
|
||||
|
||||
int avrdude_message2(FILE *fp, int lno, const char *file, const char *func, int msgmode, int msglvl, const char *format, ...);
|
||||
int avrdude_message2(FILE *fp, int lno, const char *file, const char *func, int msgmode, int msglvl, const char *format, ...)
|
||||
#if defined(__GNUC__) // Ask gcc to check whether format and parameters match
|
||||
__attribute__ ((format (printf, 7, 8)))
|
||||
#endif
|
||||
;
|
||||
|
||||
#define MSG_EXT_ERROR (-3) // OS-type error, no -v option, can be suppressed with -qqqqq
|
||||
#define MSG_ERROR (-2) // Avrdude error, no -v option, can be suppressed with -qqqq
|
||||
|
||||
@@ -556,7 +556,7 @@ fi
|
||||
# If we are compiling with gcc, enable all warnings and make warnings errors.
|
||||
ENABLE_WARNINGS=""
|
||||
if test "x$GCC" = xyes; then
|
||||
ENABLE_WARNINGS="-Wall -Wextra -Wno-unused-parameter"
|
||||
ENABLE_WARNINGS="-Wall -Wextra -Wno-unused-parameter -Wno-format-zero-length"
|
||||
|
||||
# does this compiler support -Wno-pointer-sign ?
|
||||
AC_MSG_CHECKING([if gcc accepts -Wno-pointer-sign ])
|
||||
|
||||
Reference in New Issue
Block a user