Bug 4812 - GCC __attribute__ annotations for printf, non-returning functions etc., patch by linux@youmustbejoking.demon.co.uk and Zack Middleton
This commit is contained in:
1 parent
69a7ada911
commit
9dc32d55e2
30 files changed
+63
-61
No files matched your search
+2
-2
@@ -251,7 +251,7 @@ void String_Init(void) {
|
||||
PC_SourceWarning
|
||||
=================
|
||||
*/
|
||||
void PC_SourceWarning(int handle, char *format, ...) {
|
||||
static __attribute__ ((format (printf, 2, 3))) void PC_SourceWarning(int handle, char *format, ...) {
|
||||
int line;
|
||||
char filename[128];
|
||||
va_list argptr;
|
||||
@@ -273,7 +273,7 @@ void PC_SourceWarning(int handle, char *format, ...) {
|
||||
PC_SourceError
|
||||
=================
|
||||
*/
|
||||
void PC_SourceError(int handle, char *format, ...) {
|
||||
static __attribute__ ((format (printf, 2, 3))) void PC_SourceError(int handle, char *format, ...) {
|
||||
int line;
|
||||
char filename[128];
|
||||
va_list argptr;
|
||||
|
||||
+2
-2
@@ -354,8 +354,8 @@ typedef struct {
|
||||
void (*getBindingBuf)( int keynum, char *buf, int buflen );
|
||||
void (*setBinding)( int keynum, const char *binding );
|
||||
void (*executeText)(int exec_when, const char *text );
|
||||
void (*Error)(int level, const char *error, ...);
|
||||
void (*Print)(const char *msg, ...);
|
||||
void (*Error)(int level, const char *error, ...) __attribute__ ((format (printf, 2, 3)));
|
||||
void (*Print)(const char *msg, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
void (*Pause)(qboolean b);
|
||||
int (*ownerDrawWidth)(int ownerDraw, float scale);
|
||||
sfxHandle_t (*registerSound)(const char *name, qboolean compressed);
|
||||
|
||||
Reference in new issue
Block a user