Bug 553032 - move MOZ_FORMAT_PRINTF to mfbt; r=froydnj
☠☠ backed out by b50520db1460 ☠ ☠
authorTom Tromey <tom@tromey.com>
Tue, 11 Oct 2016 12:42:58 -0600
changeset 318603 16f326945f3831edc2b8f2c7482650863df827b0
parent 318602 97034d83e30bcbe3bf234acbcad9fba68f08768a
child 318604 e832fc3b5a03041da9af10c22b3517137c93edbc
push id20725
push userphilringnalda@gmail.com
push dateThu, 20 Oct 2016 01:36:01 +0000
treeherderfx-team@998ad5a74da8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs553032
milestone52.0a1
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)