summaryrefslogtreecommitdiff
path: root/firmware/lib/rollback_index.c
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2013-02-26 09:40:55 -0600
committerChromeBot <chrome-bot@google.com>2013-02-26 08:46:20 -0800
commit612797edfad45e25b1fb0dc398e02e1d7d8286a2 (patch)
treec56b6708bf63a82565fcf495d18dae27073cbfb6 /firmware/lib/rollback_index.c
parente6cf2c21a1cd6fc46b6adcaadc865e2f8bd4874e (diff)
downloadvboot-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/lib/rollback_index.c')
-rw-r--r--firmware/lib/rollback_index.c9
1 files changed, 9 insertions, 0 deletions
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