]> granicus.if.org Git - nethack/commitdiff
fix warning when ENHANCED_SYMBOLS is not defined
authornhmall <nhmall@nethack.org>
Tue, 25 Oct 2022 17:59:19 +0000 (13:59 -0400)
committernhmall <nhmall@nethack.org>
Tue, 25 Oct 2022 17:59:19 +0000 (13:59 -0400)
display.c:1484:23: warning: excess elements in struct initializer [-Wexcess-initializers]
    { 0U, { 0, 0}, 0, 0 }
                      ^
1 warning generated.

src/display.c

index fc6a6474f19dbaa33bdaa69aa7f549698a80108b..437a2b56186453e875070673cd242ec409aa8fc2 100644 (file)
@@ -1481,7 +1481,11 @@ const glyph_info nul_glyphinfo = {
 extern glyph_map glyphmap[MAX_GLYPH]; /* from tile.c */
 #else
 glyph_map glyphmap[MAX_GLYPH] = {
-    { 0U, { 0, 0}, 0, 0 }
+    { 0U, { 0, 0}, 0, 0
+#ifdef ENHANCED_SYMBOLS
+      , 0
+#endif
+    }
 };
 #endif