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 <michael.i.doherty@intel.com>
This commit is contained in:
Ikey Doherty
2017-02-01 17:39:23 -08:00
committed by tmarcu
parent 6324401974
commit f477daead8
+6 -3
View File
@@ -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;
}
}