Reviewed by Sam Weinig.
Add printf format attribute to several functions. Use the the new WTF_ATTRIBUTE_PRINTF define.
* dom/XMLTokenizer.cpp:
* dom/XMLTokenizer.h:
* platform/DeprecatedString.h:
* platform/PlatformString.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28028
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-11-24 Laszlo Gombos <laszlo.gombos@gmail.com>
+
+ Reviewed by Sam Weinig.
+
+ Add printf format attribute to several functions. Use the the new WTF_ATTRIBUTE_PRINTF define.
+
+ * dom/XMLTokenizer.cpp:
+ * dom/XMLTokenizer.h:
+ * platform/DeprecatedString.h:
+ * platform/PlatformString.h:
+
2007-11-25 Dan Bernstein <mitz@apple.com>
Reviewed by Adam Roben.
getTokenizer(closure)->comment(comment);
}
+WTF_ATTRIBUTE_PRINTF(2, 3)
static void warningHandler(void* closure, const char* message, ...)
{
va_list args;
va_end(args);
}
+WTF_ATTRIBUTE_PRINTF(2, 3)
static void fatalErrorHandler(void* closure, const char* message, ...)
{
va_list args;
va_end(args);
}
+WTF_ATTRIBUTE_PRINTF(2, 3)
static void normalErrorHandler(void* closure, const char* message, ...)
{
va_list args;
static_cast<XMLTokenizer*>(closure)->comment(comment);
}
+WTF_ATTRIBUTE_PRINTF(2, 3)
static void balancedWarningHandler(void* closure, const char* message, ...)
{
va_list args;
#ifndef USE_QXMLSTREAM
// callbacks from parser SAX
- void error(ErrorType, const char* message, va_list args);
+ void error(ErrorType, const char* message, va_list args) WTF_ATTRIBUTE_PRINTF(3, 0);
void startElementNs(const xmlChar* xmlLocalName, const xmlChar* xmlPrefix, const xmlChar* xmlURI, int nb_namespaces,
const xmlChar** namespaces, int nb_attributes, int nb_defaulted, const xmlChar** libxmlAttributes);
void endElementNs();
DeprecatedString &setNum(unsigned long);
DeprecatedString &setNum(double);
- DeprecatedString& format(const char *, ...)
-#if __GNUC__
- __attribute__ ((format (printf, 2, 3)))
-#endif
- ;
+ DeprecatedString& format(const char *, ...) WTF_ATTRIBUTE_PRINTF(2, 3);
DeprecatedString &append(const DeprecatedString &);
DeprecatedString &append(DeprecatedChar);
static String number(unsigned long long);
static String number(double);
- static String format(const char *, ...)
-#if __GNUC__
- __attribute__ ((format (printf, 1, 2)))
-#endif
- ;
+ static String format(const char *, ...) WTF_ATTRIBUTE_PRINTF(1, 2);
Vector<String> split(const String& separator, bool allowEmptyEntries = false) const;
Vector<String> split(UChar separator, bool allowEmptyEntries = false) const;