From f477daead8288a52eb1c0f954a589335f410892c Mon Sep 17 00:00:00 2001 From: Ikey Doherty Date: Wed, 1 Feb 2017 19:18:42 +0000 Subject: [PATCH] scripts: Silence system() invocation warnings Explicitly mark the return results of system as unused. This helps to cut down on the compiler spam as we (by design) do not check the return results of the scripts portion. Signed-off-by: Ikey Doherty --- src/scripts.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/scripts.c b/src/scripts.c index 1bb436bb..5f6a3bf0 100644 --- a/src/scripts.c +++ b/src/scripts.c @@ -49,8 +49,10 @@ static void update_boot(void) static void update_triggers(void) { - system("/usr/bin/systemctl --no-block daemon-reload"); - system("/usr/bin/systemctl --no-block restart update-triggers.target"); + __attribute__((unused)) int ret = 0; + + ret = system("/usr/bin/systemctl --no-block daemon-reload"); + ret = system("/usr/bin/systemctl --no-block restart update-triggers.target"); } void run_scripts(void) @@ -80,6 +82,7 @@ void run_preupdate_scripts(struct manifest *manifest) struct file *file; struct stat sb; char *script; + __attribute__((unused)) int ret = 0; string_or_die(&script, "/usr/bin/clr_pre_update.sh"); @@ -98,7 +101,7 @@ void run_preupdate_scripts(struct manifest *manifest) /* Check that system file matches file in manifest */ if (verify_file(file, script)) { - system(script); + ret = system(script); break; } }