]> granicus.if.org Git - nethack/commitdiff
resolve build error on windows with vs2022
authornhmall <nhmall@nethack.org>
Sat, 16 Apr 2022 12:32:13 +0000 (08:32 -0400)
committernhmall <nhmall@nethack.org>
Sat, 16 Apr 2022 12:32:13 +0000 (08:32 -0400)
win/tty/getline.c(305) :
warning C4701: potentially uninitialized local variable 'ecmatches' used
win/tty/getline.c(305) :
error C4703: potentially uninitialized local pointer variable
'ecmatches' used

win/tty/getline.c

index 98d1461d2253e2dbe754c23f4e6209dd723d9734..4da3d0e6fce29c884a63eb89fd6dd80174129160 100644 (file)
@@ -270,7 +270,7 @@ tty_get_ext_cmd(void)
 {
     char buf[BUFSZ];
     int nmatches;
-    int *ecmatches;
+    int *ecmatches = 0;
     boolean (*no_hook)(char *base) = (boolean (*)(char *)) 0;
     char extcmd_char[2];