summaryrefslogtreecommitdiff
path: root/src/stdafx.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdafx.h')
-rw-r--r--src/stdafx.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/stdafx.h b/src/stdafx.h
index 7120ec175..c75e4ca48 100644
--- a/src/stdafx.h
+++ b/src/stdafx.h
@@ -128,6 +128,11 @@
/* Warn about functions using 'printf' format syntax. First argument determines which parameter
* is the format string, second argument is start of values passed to printf. */
#define WARN_FORMAT(string, args) __attribute__ ((format (printf, string, args)))
+ #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)
+ #define FINAL final
+ #else
+ #define FINAL
+ #endif
#endif /* __GNUC__ */
#if defined(__WATCOMC__)
@@ -136,6 +141,7 @@
#define CDECL
#define GCC_PACK
#define WARN_FORMAT(string, args)
+ #define FINAL
#include <malloc.h>
#endif /* __WATCOMC__ */
@@ -176,7 +182,6 @@
#pragma warning(disable: 6031) // code analyzer: Return value ignored: 'ReadFile'
#pragma warning(disable: 6255) // code analyzer: _alloca indicates failure by raising a stack overflow exception. Consider using _malloca instead
#pragma warning(disable: 6246) // code analyzer: Local declaration of 'statspec' hides declaration of the same name in outer scope. For additional information, see previous declaration at ...
- #define WARN_FORMAT(string, args)
#include <malloc.h> // alloca()
#define NORETURN __declspec(noreturn)
@@ -188,6 +193,8 @@
#endif
#define GCC_PACK
+ #define WARN_FORMAT(string, args)
+ #define FINAL sealed
int CDECL snprintf(char *str, size_t size, const char *format, ...) WARN_FORMAT(3, 4);
#if defined(WINCE)