mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-11 03:01:01 +00:00
Check format string in calls of debug/error (adapted from patch #1445422)
svn-id: r21139
This commit is contained in:
parent
871c394e28
commit
c59ca20ce6
@ -369,8 +369,9 @@
|
||||
#if defined(__GNUC__)
|
||||
#define GCC_PACK __attribute__((packed))
|
||||
#define NORETURN __attribute__((__noreturn__))
|
||||
#define GCC_PRINTF(x,y) __attribute__((format(printf, x, y)))
|
||||
#else
|
||||
#define GCC_PACK
|
||||
#define GCC_PRINTF(x,y)
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -261,21 +261,20 @@ const Array<EngineDebugLevel> &listSpecialDebugLevels();
|
||||
} // End of namespace Common
|
||||
|
||||
|
||||
|
||||
#if defined(__GNUC__)
|
||||
void CDECL error(const char *s, ...) NORETURN;
|
||||
void CDECL error(const char *s, ...) GCC_PRINTF(1, 2) NORETURN;
|
||||
#else
|
||||
void CDECL NORETURN error(const char *s, ...);
|
||||
#endif
|
||||
|
||||
void CDECL warning(const char *s, ...);
|
||||
void CDECL warning(const char *s, ...) GCC_PRINTF(1, 2);
|
||||
|
||||
void CDECL debug(int level, const char *s, ...);
|
||||
void CDECL debug(const char *s, ...);
|
||||
void CDECL debugN(int level, const char *s, ...);
|
||||
void CDECL debug(int level, const char *s, ...) GCC_PRINTF(2, 3);
|
||||
void CDECL debug(const char *s, ...) GCC_PRINTF(1, 2);
|
||||
void CDECL debugN(int level, const char *s, ...) GCC_PRINTF(2, 3);
|
||||
void checkHeap();
|
||||
|
||||
void CDECL debugC(int level, uint32 engine_level, const char *s, ...);
|
||||
void CDECL debugC(int level, uint32 engine_level, const char *s, ...) GCC_PRINTF(3, 4);
|
||||
|
||||
extern int gDebugLevel;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user