kdrive: Explicitly ignore errors from the -switchCmd script
Make it clear that we intentionally ignore the -switchCmd return value. This keeps GCC from emitting a warning when the server is compiled with -D_FORTIFY_SOURCE=2. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
This commit is contained in:
parent
570b1c7994
commit
696e08f8e8
|
@ -118,10 +118,17 @@ KdDoSwitchCmd(const char *reason)
|
||||||
{
|
{
|
||||||
if (kdSwitchCmd) {
|
if (kdSwitchCmd) {
|
||||||
char *command;
|
char *command;
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (asprintf(&command, "%s %s", kdSwitchCmd, reason) == -1)
|
if (asprintf(&command, "%s %s", kdSwitchCmd, reason) == -1)
|
||||||
return;
|
return;
|
||||||
system(command);
|
|
||||||
|
/* Ignore the return value from system; I'm not sure
|
||||||
|
* there's anything more useful to be done when
|
||||||
|
* it fails
|
||||||
|
*/
|
||||||
|
ret = system(command);
|
||||||
|
(void) ret;
|
||||||
free(command);
|
free(command);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user