summaryrefslogtreecommitdiff
path: root/toxcore/ccompat.h
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-02-23 02:22:38 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-02-24 22:20:22 +0000
commitd3b286cb434ed228e7b62cc70cb293e7a5554bfa (patch)
tree9ab3dd66f9dba2ca861ba8c6e098fb96754aa80b /toxcore/ccompat.h
parentafc80922e720f5d2a93bdfb3745da058e5ddf81b (diff)
Fix a bunch of compiler warnings and remove suppressions.
Diffstat (limited to 'toxcore/ccompat.h')
-rw-r--r--toxcore/ccompat.h8
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 */