diff --git a/src/cmd.c b/src/cmd.c index ef4354a70..728157d7a 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -201,7 +201,6 @@ STATIC_DCL void FDECL(show_direction_keys, (winid, CHAR_P, BOOLEAN_P)); STATIC_DCL boolean FDECL(help_dir, (CHAR_P, int, const char *)); static const char *readchar_queue = ""; -static coord clicklook_cc; /* for rejecting attempts to use wizard mode commands */ static const char unavailcmd[] = "Unavailable command '%s'."; /* for rejecting #if !SHELL, !SUSPEND */ diff --git a/src/decl.c b/src/decl.c index ac9903cb3..58357dbf4 100644 --- a/src/decl.c +++ b/src/decl.c @@ -299,6 +299,8 @@ unsigned nhUse_dummy = 0; #define IVMAGIC 0xdeadbeef +#pragma GCC diagnostic ignored "-Wmissing-braces" + const struct instance_globals g_init = { /* apply.c */ 0, /* jumping_is_magic */ diff --git a/sys/unix/unixmain.c b/sys/unix/unixmain.c index f798fa163..eb9d36c37 100644 --- a/sys/unix/unixmain.c +++ b/sys/unix/unixmain.c @@ -92,8 +92,8 @@ char *argv[]; } #endif - hname = argv[0]; - hackpid = getpid(); + g.hname = argv[0]; + g.hackpid = getpid(); (void) umask(0777 & ~FCMASK); choose_windows(DEFAULT_WINDOW_SYS); @@ -152,7 +152,7 @@ char *argv[]; initoptions(); #endif #ifdef PANICTRACE - ARGV0 = hname; /* save for possible stack trace */ + ARGV0 = g.hname; /* save for possible stack trace */ #ifndef NO_SIGNAL panictrace_setsignals(TRUE); #endif @@ -180,7 +180,7 @@ char *argv[]; #endif initoptions(); #ifdef PANICTRACE - ARGV0 = hname; /* save for possible stack trace */ + ARGV0 = g.hname; /* save for possible stack trace */ #ifndef NO_SIGNAL panictrace_setsignals(TRUE); #endif diff --git a/sys/unix/unixunix.c b/sys/unix/unixunix.c index 05fe285f2..f241248d3 100644 --- a/sys/unix/unixunix.c +++ b/sys/unix/unixunix.c @@ -203,8 +203,8 @@ gotlock: if (fd == -1) { error("cannot creat lock file (%s).", fq_lock); } else { - if (write(fd, (genericptr_t) &hackpid, sizeof hackpid) - != sizeof hackpid) { + if (write(fd, (genericptr_t) &g.hackpid, sizeof g.hackpid) + != sizeof g.hackpid) { error("cannot write lock (%s)", fq_lock); } if (close(fd) == -1) { diff --git a/win/tty/termcap.c b/win/tty/termcap.c index c373df04c..e30111f18 100644 --- a/win/tty/termcap.c +++ b/win/tty/termcap.c @@ -493,7 +493,7 @@ tty_start_screen() /* set up callback in case option is not set yet but toggled later */ decgraphics_mode_callback = tty_decgraphics_termcap_fixup; #endif - if (Cmd.num_pad) + if (g.Cmd.num_pad) tty_number_pad(1); /* make keypad send digits */ }