Bug 553032 - move MOZ_FORMAT_PRINTF to mfbt; r?froydnj draft
authorTom Tromey <tom@tromey.com>
Tue, 11 Oct 2016 12:42:58 -0600
changeset 428046 5c4a55ec4f2c8738c4fba54c9a092906ef68893a
parent 428045 75c306c21c0f719b590d4ebd63e1ca7ad8981adc
child 428047 369fff41062922c79b4843301fe51a56a748847d
push id33217
push userbmo:ttromey@mozilla.com
push dateFri, 21 Oct 2016 14:02:14 +0000
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)