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 /tests/vboot_detach_menu_tests.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 'tests/vboot_detach_menu_tests.c')
-rw-r--r-- | tests/vboot_detach_menu_tests.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/vboot_detach_menu_tests.c b/tests/vboot_detach_menu_tests.c index 182ba3e2..bf71a5f4 100644 --- a/tests/vboot_detach_menu_tests.c +++ b/tests/vboot_detach_menu_tests.c @@ -24,6 +24,7 @@ #include "vboot_display.h" #include "vboot_kernel.h" #include "vboot_struct.h" +#include "vboot_test.h" #include "vboot_ui_menu_private.h" /* Mock data */ @@ -59,9 +60,6 @@ static uint32_t beeps_count = 0; static uint32_t mock_altfw_mask; static int vbexaltfwmask_called; -extern enum VbEcBootMode_t VbGetMode(void); -extern struct RollbackSpaceFwmp *VbApiKernelGetFwmp(void); - /* Reset mock data (for use before each test) */ static void ResetMocks(void) { @@ -196,7 +194,7 @@ int vb2_audio_looping(void) return 1; } -VbError_t VbTryLoadKernel(struct vb2_context *ctx, uint32_t get_info_flags) +VbError_t VbTryLoadKernel(struct vb2_context *c, uint32_t get_info_flags) { if (vbtlk_retval_count < ARRAY_SIZE(vbtlk_retval) && vbtlk_retval[vbtlk_retval_count] != 0) @@ -204,7 +202,7 @@ VbError_t VbTryLoadKernel(struct vb2_context *ctx, uint32_t get_info_flags) return vbtlk_last_retval + get_info_flags; } -VbError_t VbDisplayScreen(struct vb2_context *ctx, uint32_t screen, int force, +VbError_t VbDisplayScreen(struct vb2_context *c, uint32_t screen, int force, const VbScreenData *data) { if (screens_count < ARRAY_SIZE(screens_displayed)) @@ -214,7 +212,7 @@ VbError_t VbDisplayScreen(struct vb2_context *ctx, uint32_t screen, int force, return VBERROR_SUCCESS; } -VbError_t VbDisplayMenu(struct vb2_context *ctx, uint32_t screen, int force, +VbError_t VbDisplayMenu(struct vb2_context *c, uint32_t screen, int force, uint32_t selected_index, uint32_t disabled_idx_mask) { if (screens_count < ARRAY_SIZE(screens_displayed)) @@ -229,7 +227,7 @@ VbError_t VbDisplayMenu(struct vb2_context *ctx, uint32_t screen, int force, return VBERROR_SUCCESS; } -VbError_t VbDisplayDebugInfo(struct vb2_context *ctx) +VbError_t VbDisplayDebugInfo(struct vb2_context *c) { debug_info_displayed = 1; return VBERROR_SUCCESS; |