mirror of
https://github.com/devkitPro/wut.git
synced 2026-10-01 14:28:15 -05:00
Add WUT_FORMAT_PRINTF and fix some format string bugs. (#404)
Some checks failed
C/C++ CI / ubuntu-latest (push) Has been cancelled
Some checks failed
C/C++ CI / ubuntu-latest (push) Has been cancelled
This commit is contained in:
@@ -30,27 +30,32 @@ void
|
||||
COSVReport(COSReportModule module,
|
||||
COSReportLevel level,
|
||||
const char* fmt,
|
||||
...);
|
||||
...)
|
||||
WUT_FORMAT_PRINTF(3, 4);
|
||||
|
||||
void
|
||||
COSError(COSReportModule module,
|
||||
const char* fmt,
|
||||
...);
|
||||
...)
|
||||
WUT_FORMAT_PRINTF(2, 3);
|
||||
|
||||
void
|
||||
COSInfo(COSReportModule module,
|
||||
const char* fmt,
|
||||
...);
|
||||
...)
|
||||
WUT_FORMAT_PRINTF(2, 3);
|
||||
|
||||
void
|
||||
COSVerbose(COSReportModule module,
|
||||
const char* fmt,
|
||||
...);
|
||||
...)
|
||||
WUT_FORMAT_PRINTF(2, 3);
|
||||
|
||||
void
|
||||
COSWarn(COSReportModule module,
|
||||
const char* fmt,
|
||||
...);
|
||||
...)
|
||||
WUT_FORMAT_PRINTF(2, 3);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -65,25 +65,30 @@ __OSConsoleWrite(const char *msg,
|
||||
uint32_t size);
|
||||
|
||||
void
|
||||
OSReport(const char *fmt, ...);
|
||||
OSReport(const char *fmt, ...)
|
||||
WUT_FORMAT_PRINTF(1, 2);
|
||||
|
||||
|
||||
void
|
||||
OSReportVerbose(const char *fmt, ...);
|
||||
OSReportVerbose(const char *fmt, ...)
|
||||
WUT_FORMAT_PRINTF(1, 2);
|
||||
|
||||
|
||||
void
|
||||
OSReportInfo(const char *fmt, ...);
|
||||
OSReportInfo(const char *fmt, ...)
|
||||
WUT_FORMAT_PRINTF(1, 2);
|
||||
|
||||
|
||||
void
|
||||
OSReportWarn(const char *fmt, ...);
|
||||
OSReportWarn(const char *fmt, ...)
|
||||
WUT_FORMAT_PRINTF(1, 2);
|
||||
|
||||
|
||||
void
|
||||
OSPanic(const char *file,
|
||||
uint32_t line,
|
||||
const char *fmt, ...);
|
||||
const char *fmt, ...)
|
||||
WUT_FORMAT_PRINTF(3, 4);
|
||||
|
||||
|
||||
void
|
||||
|
||||
@@ -6,7 +6,8 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
int
|
||||
__os_snprintf(char *buf, size_t n, const char *format, ... );
|
||||
__os_snprintf(char *buf, size_t n, const char *format, ... )
|
||||
WUT_FORMAT_PRINTF(3, 4);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user