Fix gcc-7 editor build

gcc-7 warns if a structured binding defines a variable, and then does
not use it.  Suppress the warning, since the binding is needed in the
non-editor build.
This commit is contained in:
Kp 2021-09-12 16:20:52 +00:00
parent df6777c632
commit 2da07e75e5
2 changed files with 5 additions and 0 deletions

View file

@ -1337,6 +1337,7 @@ int load_level(
if (!fp)
{
#if DXX_USE_EDITOR
con_printf(CON_VERBOSE, "Failed to open file <%s>: %s", filename, PHYSFS_getErrorByCode(physfserr));
return 1;
#else
Error("Failed to open file <%s>: %s", filename, PHYSFS_getErrorByCode(physfserr));

View file

@ -669,6 +669,8 @@ void piggy_init_pigfile(const char *filename)
if (!fp2)
{
#if DXX_USE_EDITOR
static_cast<void>(physfserr);
static_cast<void>(physfserr2);
return; //if editor, ok to not have pig, because we'll build one
#else
Error("Failed to open required files <%s>, <" DEFAULT_PIGFILE_SHAREWARE ">: \"%s\", \"%s\"", filename, PHYSFS_getErrorByCode(physfserr), PHYSFS_getErrorByCode(physfserr2));
@ -784,6 +786,8 @@ void piggy_new_pigfile(char *pigname)
if (!fp2)
{
#if DXX_USE_EDITOR
static_cast<void>(physfserr);
static_cast<void>(physfserr2);
return; //if editor, ok to not have pig, because we'll build one
#else
Error("Failed to open required files <%s>, <" DEFAULT_PIGFILE_SHAREWARE ">: \"%s\", \"%s\"", pigname, PHYSFS_getErrorByCode(physfserr), PHYSFS_getErrorByCode(physfserr2));