From 52fa8c11f8e5217e17da74c04e8ad1e5aee9ff40 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Tue, 7 May 2019 12:59:47 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/1598721 Commit-Ready: ChromeOS CL Exonerator Bot --- tests/tlcl_tests.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/tlcl_tests.c') diff --git a/tests/tlcl_tests.c b/tests/tlcl_tests.c index 00eae615..f9f990d9 100644 --- a/tests/tlcl_tests.c +++ b/tests/tlcl_tests.c @@ -273,7 +273,7 @@ static void ReadWriteTest(void) /** * Test DefineSpaceEx */ -void DefineSpaceExTest(void) { +static void DefineSpaceExTest(void) { uint8_t osap_response[] = { 0x00, 0xc4, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x00, 0x02, 0x41, 0x3d, 0xce, 0x20, 0xa2, @@ -367,7 +367,7 @@ void DefineSpaceExTest(void) { /** * Test TlclInitNvAuthPolicy. */ -void InitNvAuthPolicyTest(void) { +static void InitNvAuthPolicyTest(void) { const uint8_t empty_selection_digest[] = { 0x79, 0xdd, 0xda, 0xfd, 0xc1, 0x97, 0xdc, 0xcc, 0xe9, 0x98, 0x9a, 0xee, 0xf5, 0x52, 0x89, 0xee, @@ -798,7 +798,7 @@ static void IFXFieldUpgradeInfoTest(void) /** * Test ReadPubek */ -void ReadPubekTest(void) { +static void ReadPubekTest(void) { uint8_t response[] = { 0x00, 0xc4, 0x00, 0x00, 0x01, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, @@ -922,7 +922,7 @@ void ReadPubekTest(void) { /** * Test TakeOwnership */ -void TakeOwnershipTest(void) { +static void TakeOwnershipTest(void) { uint8_t oiap_response[] = { 0x00, 0xc4, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x04, 0x1a, 0x18, 0xa9, @@ -1071,7 +1071,7 @@ void TakeOwnershipTest(void) { /** * Test ReadDelegationFamilyTable */ -void ReadDelegationFamilyTableTest(void) { +static void ReadDelegationFamilyTableTest(void) { uint8_t response[] = { 0x00, 0xc4, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x25, -- cgit v1.2.1