]> granicus.if.org Git - nethack/commitdiff
warning fix
authornhmall <nhmall@nethack.org>
Fri, 7 Oct 2022 00:57:54 +0000 (20:57 -0400)
committernhmall <nhmall@nethack.org>
Fri, 7 Oct 2022 00:57:54 +0000 (20:57 -0400)
../win/curses/cursmain.c: In function 'curses_init_nhwindows':
../win/curses/cursmain.c:157:17: warning: unused variable 'pdc_font' [-Wunused-variable]
  157 |     static char pdc_font[BUFSZ] = "";
      |                 ^~~~~~~~
../win/curses/cursmain.c: At top level:
../win/curses/cursmain.c:157:17: warning: 'pdc_font' defined but not used [-Wunused-variable]

win/curses/cursmain.c

index 1732ff4b6c5247d4929d14bc609d3fc345746b24..0a3d4403004bac91a902e63340fe3a7660812b59 100644 (file)
@@ -154,9 +154,13 @@ curses_init_nhwindows(int *argcp UNUSED,
                       char **argv UNUSED)
 {
 #ifdef PDCURSES
-    static char pdc_font[BUFSZ] = "";
     char window_title[BUFSZ];
 #endif
+#ifdef CURSES_UNICODE
+#ifdef PDCURSES
+    static char pdc_font[BUFSZ] = "";
+#endif
+#endif
 
 #ifdef CURSES_UNICODE
     setlocale(LC_CTYPE, "");