diff options
author | Aaron Durbin <adurbin@chromium.org> | 2013-02-26 09:40:55 -0600 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-02-26 08:46:20 -0800 |
commit | 612797edfad45e25b1fb0dc398e02e1d7d8286a2 (patch) | |
tree | c56b6708bf63a82565fcf495d18dae27073cbfb6 /firmware | |
parent | e6cf2c21a1cd6fc46b6adcaadc865e2f8bd4874e (diff) | |
download | vboot-612797edfad45e25b1fb0dc398e02e1d7d8286a2.tar.gz |
fwlib: fix errors with -Wmissing-prototypes
When the fwlib is built with -Wmissing-prototypes and -Werror
there build breakages that occur. Fix these errors by either
including the header file with the correct declaration or provide
the declaration at the top of the c files for global symbols that
are used by tests.
BUG=chrome-os-partner:17695
BRANCH=None
TEST=built fwlib library with -Wmissing-prototypes and -Werror. Also
'make runtests' still passes.
Change-Id: I992516ee2545509054887173bc65234905381e06
Signed-off-by: Aaron Durbin
Reviewed-on: https://gerrit.chromium.org/gerrit/44042
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
Tested-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/lib/include/vboot_kernel.h | 1 | ||||
-rw-r--r-- | firmware/lib/rollback_index.c | 9 | ||||
-rw-r--r-- | firmware/lib/tpm_bootmode.c | 3 | ||||
-rw-r--r-- | firmware/lib/vboot_api_kernel.c | 1 |
4 files changed, 12 insertions, 2 deletions
diff --git a/firmware/lib/include/vboot_kernel.h b/firmware/lib/include/vboot_kernel.h index e3a44190..1243cb84 100644 --- a/firmware/lib/include/vboot_kernel.h +++ b/firmware/lib/include/vboot_kernel.h @@ -12,7 +12,6 @@ #include "cgptlib.h" #include "load_firmware_fw.h" #include "vboot_api.h" -#include "vboot_kernel.h" /** * Allocate and read GPT data from the drive. The sector_bytes and diff --git a/firmware/lib/rollback_index.c b/firmware/lib/rollback_index.c index a7b65510..1dd2f9e4 100644 --- a/firmware/lib/rollback_index.c +++ b/firmware/lib/rollback_index.c @@ -17,6 +17,15 @@ #define offsetof(A,B) __builtin_offsetof(A,B) #endif +/* + * Provide protoypes for functions not in the header file. These prototypes + * fix -Wmissing-prototypes warnings. + */ +uint32_t ReadSpaceFirmware(RollbackSpaceFirmware *rsf); +uint32_t WriteSpaceFirmware(RollbackSpaceFirmware *rsf); +uint32_t ReadSpaceKernel(RollbackSpaceKernel *rsk); +uint32_t WriteSpaceKernel(RollbackSpaceKernel *rsk); + #ifdef FOR_TEST /* * Compiling for unit test, so we need the real implementations of diff --git a/firmware/lib/tpm_bootmode.c b/firmware/lib/tpm_bootmode.c index ec8fac7e..218db207 100644 --- a/firmware/lib/tpm_bootmode.c +++ b/firmware/lib/tpm_bootmode.c @@ -96,7 +96,8 @@ const uint8_t kBootInvalidSHA1Digest[] = { * Given the boot state, return the correct SHA1 digest index for TPMExtend * in kBootStateSHA1Digests[]. */ -int GetBootStateIndex(int dev_mode, int rec_mode, uint64_t keyblock_flags) +static int GetBootStateIndex(int dev_mode, int rec_mode, + uint64_t keyblock_flags) { int index = 0; diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c index a55d8064..483d47ed 100644 --- a/firmware/lib/vboot_api_kernel.c +++ b/firmware/lib/vboot_api_kernel.c @@ -13,6 +13,7 @@ #include "vboot_audio.h" #include "vboot_common.h" #include "vboot_display.h" +#include "vboot_kernel.h" #include "vboot_nvstorage.h" /* Global variables */ |