StrFormat() is a printf-like function, mark it as such, fix fallout. (#727)
Fixes #714.
diff --git a/src/string_util.h b/src/string_util.h
index 4a55012..fc5f8b0 100644
--- a/src/string_util.h
+++ b/src/string_util.h
@@ -12,7 +12,11 @@
std::string HumanReadableNumber(double n, double one_k = 1024.0);
-std::string StrFormat(const char* format, ...);
+#ifdef __GNUC__
+__attribute__((format(printf, 1, 2)))
+#endif
+std::string
+StrFormat(const char* format, ...);
inline std::ostream& StrCatImp(std::ostream& out) BENCHMARK_NOEXCEPT {
return out;