Bug 1334302 - use MOZ_FORMAT_PRINTF in nsCSSRenderingBorders.h; r=mattwoodrow
authorTom Tromey <tom@tromey.com>
Wed, 26 Apr 2017 14:59:15 -0600
changeset 355551 0c9232d39a0668d363d885e3d9134a786494d83e
parent 355550 2ef90307f7cfe4f108eb8111fb1fb2ed6553f7b2
child 355552 61140ae08b48fe4450d58530a607770a04fa8ed1
push id31732
push userkwierso@gmail.com
push dateFri, 28 Apr 2017 22:43:27 +0000
treeherdermozilla-central@1c994cd72265 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1334302
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
layout/painting/nsCSSRenderingBorders.h
--- 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 */