summaryrefslogtreecommitdiff
path: root/src/stdafx.h
diff options
context:
space:
mode:
authorMilek7 <Milek7@users.noreply.github.com>2021-04-28 23:06:47 +0200
committerGitHub <noreply@github.com>2021-04-28 22:06:47 +0100
commit8e9eca6dddf238c77f01d93afcefcca262447e98 (patch)
tree334d6cee0f31e52b9f3108a3d05aad16b272ae6e /src/stdafx.h
parent267703c14be579b168125e2b3fbab2e407638ced (diff)
downloadopenttd-8e9eca6dddf238c77f01d93afcefcca262447e98.tar.xz
Codechange: Use __attribute__ access none to silence GCC 11 -Wmaybe-uninitialized warnings (#9124)
Diffstat (limited to 'src/stdafx.h')
-rw-r--r--src/stdafx.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/stdafx.h b/src/stdafx.h
index 6a3322345..19009f5ff 100644
--- a/src/stdafx.h
+++ b/src/stdafx.h
@@ -138,6 +138,12 @@
# endif
#endif /* __GNUC__ || __clang__ */
+#if __GNUC__ > 11 || (__GNUC__ == 11 && __GNUC_MINOR__ >= 1)
+# define NOACCESS(args) __attribute__ ((access (none, args)))
+#else
+# define NOACCESS(args)
+#endif
+
#if defined(__WATCOMC__)
# define NORETURN
# define CDECL