diff --git a/libdrgn/configure.ac b/libdrgn/configure.ac index efd457415..1faa2a631 100644 --- a/libdrgn/configure.ac +++ b/libdrgn/configure.ac @@ -113,6 +113,7 @@ AS_IF([test "x$enable_compiler_warnings" != xno], -Wimplicit-fallthrough dnl -Wmissing-prototypes dnl -Wvla dnl + -Wno-format-zero-length dnl ], [WARN_CFLAGS], [$compiler_flags_test])]) AS_IF([test "x$enable_compiler_warnings" = xerror], [AX_APPEND_FLAG([-Werror], [WARN_CFLAGS])]) diff --git a/libdrgn/log.h b/libdrgn/log.h index 74085afc8..1414eca23 100644 --- a/libdrgn/log.h +++ b/libdrgn/log.h @@ -67,7 +67,7 @@ void drgn_log(enum drgn_log_level level, struct drgn_program *prog, /** * Log a printf-style message followed by a @ref drgn_error at the given level. */ -__attribute__((__format__(__printf__, 4, 5))) +__attribute__((__format__(__printf__, 4, 5), __nonnull__(2, 4))) void drgn_error_log(enum drgn_log_level level, struct drgn_program *prog, struct drgn_error *err, const char *format, ...); /** Log a critical message followed by a @ref drgn_error. */