nethack: fix for gcc-12
This commit is contained in:
parent
5f2aaea03e
commit
584f33ae7d
|
@ -0,0 +1,14 @@
|
||||||
|
--- a/include/tradstdc.h
|
||||||
|
+++ b/include/tradstdc.h
|
||||||
|
@@ -431,7 +431,11 @@
|
||||||
|
#define NORETURN __attribute__((noreturn))
|
||||||
|
/* disable gcc's __attribute__((__warn_unused_result__)) since explicitly
|
||||||
|
discarding the result by casting to (void) is not accepted as a 'use' */
|
||||||
|
+#if __GNUC__ >= 11
|
||||||
|
+#define __warn_unused_result__ unused
|
||||||
|
+#elif
|
||||||
|
#define __warn_unused_result__ /*empty*/
|
||||||
|
+#endif
|
||||||
|
#define warn_unused_result /*empty*/
|
||||||
|
#endif
|
||||||
|
#endif
|
Loading…
Reference in New Issue