Bug 553032 - move MOZ_FORMAT_PRINTF to mfbt; r=froydnj
authorTom Tromey <tom@tromey.com>
Tue, 11 Oct 2016 12:42:58 -0600
changeset 318971 ce2b6b8bfa16cbbd398de071bfdfdd40b880999b
parent 318970 544da89e82defe4fdff2353974715d6da2e10e19
child 318972 7ece94001875a0fee5866091a70eb746fb0a4240
push id83047
push userryanvm@gmail.com
push dateFri, 21 Oct 2016 21:15:09 +0000
treeherdermozilla-inbound@32f298a71ce9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs553032
milestone52.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 553032 - move MOZ_FORMAT_PRINTF to mfbt; r=froydnj MozReview-Commit-ID: 2aC4ZUOsGPK
mfbt/Attributes.h
xpcom/base/nscore.h
--- a/mfbt/Attributes.h
+++ b/mfbt/Attributes.h
@@ -564,9 +564,19 @@
 #  include "mozilla/Compiler.h"
 #  if MOZ_GCC_VERSION_AT_LEAST(4, 8, 1)
 #    define MOZ_HAVE_REF_QUALIFIERS
 #  endif
 #endif
 
 #endif /* __cplusplus */
 
+/**
+ * Printf style formats
+ */
+#ifdef __GNUC__
+#define MOZ_FORMAT_PRINTF(stringIndex, firstToCheck)  \
+    __attribute__ ((format (printf, stringIndex, firstToCheck)))
+#else
+#define MOZ_FORMAT_PRINTF(stringIndex, firstToCheck)
+#endif
+
 #endif /* mozilla_Attributes_h */
--- a/xpcom/base/nscore.h
+++ b/xpcom/base/nscore.h
@@ -155,26 +155,16 @@
 # define MOZ_DEPRECATED __attribute__((deprecated))
 #elif defined(_MSC_VER)
 # define MOZ_DEPRECATED __declspec(deprecated)
 #else
 # define MOZ_DEPRECATED
 #endif
 
 /**
- * Printf style formats
- */
-#ifdef __GNUC__
-#define MOZ_FORMAT_PRINTF(stringIndex, firstToCheck)  \
-    __attribute__ ((format (printf, stringIndex, firstToCheck)))
-#else
-#define MOZ_FORMAT_PRINTF(stringIndex, firstToCheck)
-#endif
-
-/**
  * Generic API modifiers which return the standard XPCOM nsresult type
  *
  * - NS_IMETHOD: use for in-class declarations and definitions.
  * - NS_IMETHODIMP: use for out-of-class definitions.
  * - NS_METHOD: usually used in conjunction with NS_CALLBACK.
  * - NS_CALLBACK: used in some legacy situations. Best avoided.
  */
 #define NS_IMETHOD          NS_IMETHOD_(nsresult)