Bug 1334302 - use MOZ_FORMAT_PRINTF in nsCSSRenderingBorders.h; r?mattwoodrow
Add MOZ_FORMAT_PRINTF to the definitions of PrintAsFormatString in
nsCSSRenderingBorders.h.
MozReview-Commit-ID: 9ZcSgNIPPhM
--- a/layout/painting/nsCSSRenderingBorders.h
+++ b/layout/painting/nsCSSRenderingBorders.h
@@ -349,28 +349,28 @@ static inline void PrintAsString(const c
static inline void PrintAsStringNewline(const char *s = nullptr) {
if (s)
fprintf (stderr, "%s", s);
fprintf (stderr, "\n");
fflush (stderr);
}
-static inline void PrintAsFormatString(const char *fmt, ...) {
+static inline MOZ_FORMAT_PRINTF(1, 2) void PrintAsFormatString(const char *fmt, ...) {
va_list vl;
va_start(vl, fmt);
vfprintf (stderr, fmt, vl);
va_end(vl);
}
#else
static inline void PrintAsString(const mozilla::gfx::Point& p) {}
static inline void PrintAsString(const mozilla::gfx::Size& s) {}
static inline void PrintAsString(const mozilla::gfx::Rect& r) {}
static inline void PrintAsString(const mozilla::gfx::Float f) {}
static inline void PrintAsString(const char *s) {}
static inline void PrintAsStringNewline(const char *s = nullptr) {}
-static inline void PrintAsFormatString(const char *fmt, ...) {}
+static inline MOZ_FORMAT_PRINTF(1, 2) void PrintAsFormatString(const char *fmt, ...) {}
#endif
} // namespace mozilla
#endif /* NS_CSS_RENDERING_BORDERS_H */