diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-02-23 02:22:38 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-02-24 22:20:22 +0000 |
commit | d3b286cb434ed228e7b62cc70cb293e7a5554bfa (patch) | |
tree | 9ab3dd66f9dba2ca861ba8c6e098fb96754aa80b /toxcore/ccompat.h | |
parent | afc80922e720f5d2a93bdfb3745da058e5ddf81b (diff) |
Fix a bunch of compiler warnings and remove suppressions.
Diffstat (limited to 'toxcore/ccompat.h')
-rw-r--r-- | toxcore/ccompat.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/toxcore/ccompat.h b/toxcore/ccompat.h index 90db8bc6..1ceb5a5a 100644 --- a/toxcore/ccompat.h +++ b/toxcore/ccompat.h | |||
@@ -13,7 +13,7 @@ | |||
13 | // "function") is used. Note the semantic difference: alloca'd memory does not | 13 | // "function") is used. Note the semantic difference: alloca'd memory does not |
14 | // get freed at the end of the declaration's scope. Do not use VLA() in loops or | 14 | // get freed at the end of the declaration's scope. Do not use VLA() in loops or |
15 | // you may run out of stack space. | 15 | // you may run out of stack space. |
16 | #if !defined(_MSC_VER) && __STDC_VERSION__ >= 199901L | 16 | #if !defined(_MSC_VER) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
17 | // C99 VLAs. | 17 | // C99 VLAs. |
18 | #define VLA(type, name, size) type name[size] | 18 | #define VLA(type, name, size) type name[size] |
19 | #define SIZEOF_VLA sizeof | 19 | #define SIZEOF_VLA sizeof |
@@ -42,4 +42,10 @@ | |||
42 | #define nullptr NULL | 42 | #define nullptr NULL |
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | #ifdef __GNUC__ | ||
46 | #define GNU_PRINTF __attribute__((__format__(__printf__, 6, 7))) | ||
47 | #else | ||
48 | #define GNU_PRINTF | ||
49 | #endif | ||
50 | |||
45 | #endif /* CCOMPAT_H */ | 51 | #endif /* CCOMPAT_H */ |