Silence gcc 7.5.0 warning about ignoring return value
menus.cc: In function ‘void Execute(const char*)’: menus.cc:2199:5: error: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Werror=unused-result] (void) system (s);
This commit is contained in:
parent
5d1c9ebee6
commit
cbc7afb302
@ -2196,7 +2196,9 @@ Execute(const char *s)
|
||||
restorevar = 1;
|
||||
}
|
||||
|
||||
(void) system (s);
|
||||
int rc{system(s)};
|
||||
if (rc == -1)
|
||||
fprintf(stderr, "%s: %s failed to run\n", ProgramName, s);
|
||||
|
||||
if (restorevar) { /* why bother? */
|
||||
(void) snprintf (buf, sizeof(buf), "DISPLAY=%s", oldDisplay);
|
||||
|
Loading…
x
Reference in New Issue
Block a user