From: nhmall Date: Sat, 23 Jan 2021 14:37:47 +0000 (-0500) Subject: fix missing prototype warning for Qt SELECTSAVED X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=093c53beade30cd8750e3e79a85e044f9b831b54;p=nethack fix missing prototype warning for Qt SELECTSAVED For whatever reason, Qt relies on late #define of SELECTSAVED inside files.c. The prototype in extern.h is therefore not picked up with as a result of #include "hack.h" Options were: 1. remove the conditional #if defined(SELECTSAVED) around the prototype in extern.h entirely 2. Move the forced #define of SELECTSAVED above the #include "hack.h" 3. Alter the conditional in extern.h to also include the condition for the forced #define of SELECTSAVED inside files.c This goes with option #3. --- diff --git a/include/extern.h b/include/extern.h index 8df78d720..931d5b792 100644 --- a/include/extern.h +++ b/include/extern.h @@ -804,7 +804,7 @@ E int FDECL(parse_sym_line, (char *, int)); E void FDECL(paniclog, (const char *, const char *)); E void FDECL(testinglog, (const char *, const char *, const char *)); E int FDECL(validate_prefix_locations, (char *)); -#ifdef SELECTSAVED +#if defined(SELECTSAVED) || (defined(UNIX) && defined(QT_GRAPHICS)) E char *FDECL(plname_from_file, (const char *)); #endif E char **NDECL(get_saved_games);