Turn on -Wformat-nonliteral.
Apparently there are two classes of this warning in clang.
-Wformat-security is only emitted for cases of
`func(nonliteral_fmt_string)` (no args), and -Wformat-nonliteral is
emitted for cases *with* arguments. For whatever reason, the latter
isn't included in -Wextra and must be manually enabled.
To make this more easily portable to Windows, move the existing
gnu_printf/__printf__ decision into base/macros.h as ATTRIBUTE_FORMAT.
Change-Id: I3b0990e1d1f0a2e9c13b32f5cd60478946cb5fc6
diff --git a/adb/qemu_tracing.h b/adb/qemu_tracing.h
index ff42d4f..aefba57 100644
--- a/adb/qemu_tracing.h
+++ b/adb/qemu_tracing.h
@@ -21,8 +21,10 @@
#ifndef __QEMU_TRACING_H
#define __QEMU_TRACING_H
+#include "base/macros.h"
+
/* Initializes connection with the adb-debug qemud service in the emulator. */
int adb_qemu_trace_init(void);
-void adb_qemu_trace(const char* fmt, ...);
+void adb_qemu_trace(const char* fmt, ...) ATTRIBUTE_FORMAT(1, 2);
#endif /* __QEMU_TRACING_H */