Ticket #8522: format.patch

File format.patch, 1.3 KB (added by SF/megath, 18 years ago)

svn diff trunk/common/util.h

  • trunk/common/util.h

     
    261261}       // End of namespace Common
    262262
    263263
     264#if !(defined(__GNUC__) || defined(__GNUG__) || defined(__attribute__))
     265#       define __attribute__(p) /* nothing */
     266#endif
    264267
    265268#if defined(__GNUC__)
    266 void CDECL error(const char *s, ...) NORETURN;
     269void CDECL error(const char *s, ...) __attribute__((format(printf, 1, 2))) NORETURN;
    267270#else
    268271void CDECL NORETURN error(const char *s, ...);
    269272#endif
    270273
    271 void CDECL warning(const char *s, ...);
     274void CDECL warning(const char *s, ...) __attribute__((format(printf, 1, 2)));
    272275
    273 void CDECL debug(int level, const char *s, ...);
    274 void CDECL debug(const char *s, ...);
    275 void CDECL debugN(int level, const char *s, ...);
     276void CDECL debug(int level, const char *s, ...) __attribute__((format(printf, 2, 3)));
     277void CDECL debug(const char *s, ...) __attribute__((format(printf, 1, 2)));
     278void CDECL debugN(int level, const char *s, ...) __attribute__((format(printf, 2, 3)));
    276279void checkHeap();
    277280
    278 void CDECL debugC(int level, uint32 engine_level, const char *s, ...);
     281void CDECL debugC(int level, uint32 engine_level, const char *s, ...) __attribute__((format(printf, 3, 4)));
    279282
    280283extern int gDebugLevel;
    281284