diff options
author | Julius Werner <jwerner@chromium.org> | 2019-05-07 12:59:47 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-05-14 20:13:04 -0700 |
commit | 52fa8c11f8e5217e17da74c04e8ad1e5aee9ff40 (patch) | |
tree | a4894fe06a3f1c9fcbbfe728955f75a8de59ed93 /futility/updater.c | |
parent | 88a47ff99952bb4f270a4e80c80c578e39fb9477 (diff) | |
download | vboot-52fa8c11f8e5217e17da74c04e8ad1e5aee9ff40.tar.gz |
Makefile: Enable more warnings for host utilities / tests
This patch adds a bunch of more warnings that are already enabled in
coreboot and thus already enabled for firmware builds anyway (because
coreboot just passes its CFLAGS through). Enabling it in the vboot
Makefile means they also apply to host utilities and tests, which sounds
desirable for consistency.
Fix enough of the cruft and bad coding practices that accumulated over
the years of not having warnings enabled to get it to build again (this
includes making functions static, removing dead code, cleaning up
prototypes, etc.).
Also remove -fno-strict-aliasing from the x86 firmware build options,
because it's not clear why it's there (coreboot isn't doing this, so
presumably it's not needed).
BRANCH=None
BUG=None
TEST=make runtests
Change-Id: Ie4a42083c4770a4eca133b22725be9ba85b24184
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1598721
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Diffstat (limited to 'futility/updater.c')
-rw-r--r-- | futility/updater.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/futility/updater.c b/futility/updater.c index 37fe6657..8dad7d41 100644 --- a/futility/updater.c +++ b/futility/updater.c @@ -185,7 +185,7 @@ char *host_shell(const char *command) /* An helper function to return "mainfw_act" system property. */ -static int host_get_mainfw_act() +static int host_get_mainfw_act(void) { char buf[VB_MAX_STRING_PROPERTY]; @@ -201,13 +201,13 @@ static int host_get_mainfw_act() } /* A helper function to return the "tpm_fwver" system property. */ -static int host_get_tpm_fwver() +static int host_get_tpm_fwver(void) { return VbGetSystemPropertyInt("tpm_fwver"); } /* A helper function to return the "hardware write protection" status. */ -static int host_get_wp_hw() +static int host_get_wp_hw(void) { /* wpsw refers to write protection 'switch', not 'software'. */ int v = VbGetSystemPropertyInt("wpsw_cur"); @@ -220,13 +220,13 @@ static int host_get_wp_hw() } /* A helper function to return "fw_vboot2" system property. */ -static int host_get_fw_vboot2() +static int host_get_fw_vboot2(void) { return VbGetSystemPropertyInt("fw_vboot2"); } /* A help function to get $(mosys platform version). */ -static int host_get_platform_version() +static int host_get_platform_version(void) { char *result = host_shell("mosys platform version"); int rev = -1; @@ -341,7 +341,7 @@ static int host_get_wp(const char *programmer) } /* Helper function to return host software write protection status. */ -static int host_get_wp_sw() +static int host_get_wp_sw(void) { return host_get_wp(PROG_HOST); } |