From e20fd2c3870285745efca903b5fdef57982820de Mon Sep 17 00:00:00 2001 From: Brad Harding Date: Tue, 10 Oct 2023 18:52:18 +1100 Subject: [PATCH] Fix GCC warning --- src/i_system.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/i_system.c b/src/i_system.c index 0f7fb1d9f9..98bc620f5a 100644 --- a/src/i_system.c +++ b/src/i_system.c @@ -314,16 +314,19 @@ void I_Error(const char *error, ...) M_snprintf(email, sizeof(email), DOOMRETRO_REPORTEMAIL "?subject=" DOOMRETRO_ERRORCAPTION "&body=%s", buffer); - ShellExecute(NULL, "open", email, NULL, NULL, SW_SHOWNORMAL); + if (!ShellExecute(NULL, "open", email, NULL, NULL, SW_SHOWNORMAL)) #elif defined(__linux__) || defined(__FreeBSD__) || defined(__HAIKU__) M_snprintf(email, sizeof(email), "xdg-open " DOOMRETRO_REPORTEMAIL "?subject=" DOOMRETRO_ERRORCAPTION "&body=%s", buffer); - system(email); + + if (!system(email)) #elif defined(__APPLE__) M_snprintf(email, sizeof(email), "open " DOOMRETRO_REPORTEMAIL "?subject=" DOOMRETRO_ERRORCAPTION "&body=%s", buffer); - system(email); + + if (!system(email)) #endif + /* nop */; } exit(-1);