summaryrefslogtreecommitdiffstats
path: root/tests/chip.c
diff options
context:
space:
mode:
authorAnastasia Klimchuk <aklm@chromium.org>2022-04-12 13:29:41 +1000
committerAnastasia Klimchuk <aklm@chromium.org>2022-04-29 04:24:33 +0000
commit402e5d697c1ea09ef48bc09cbd4f743a7d44bc52 (patch)
tree022e654e2ccf1d6a523b3de7f6f6d5d889c14596 /tests/chip.c
parentf81c1c9d0ad8e83649e5bc3c7052e0c67aff0ba6 (diff)
downloadflashrom-402e5d697c1ea09ef48bc09cbd4f743a7d44bc52.tar.gz
flashrom-402e5d697c1ea09ef48bc09cbd4f743a7d44bc52.tar.bz2
flashrom-402e5d697c1ea09ef48bc09cbd4f743a7d44bc52.zip
tests: Mark all static functions as static
Part 1 of fixing -Wmissing-prototypes warnings. This patch is adding static to all functions which are actually static. This fixes the warnings like this: warning: no previous prototype for ‘function_name’ [-Wmissing-prototypes] This patch is needed to sync compiler warning options between meson and makefile. TEST=running the following produces no warnings: meson setup --wipe (to clean build directory) ninja test Change-Id: Ic54da5ac1b2a46f55e3e3bee4ed952bdf59e8444 Signed-off-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/63571 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Diffstat (limited to 'tests/chip.c')
-rw-r--r--tests/chip.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/chip.c b/tests/chip.c
index 03d604fa0..444d411ad 100644
--- a/tests/chip.c
+++ b/tests/chip.c
@@ -46,7 +46,7 @@ static struct {
.buf = { 0 },
};
-int read_chip(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len)
+static int read_chip(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len)
{
printf("Read chip called with start=0x%x, len=0x%x\n", start, len);
if (!g_chip_state.unlock_calls) {
@@ -60,7 +60,7 @@ int read_chip(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned
return 0;
}
-int write_chip(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len)
+static int write_chip(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len)
{
printf("Write chip called with start=0x%x, len=0x%x\n", start, len);
if (!g_chip_state.unlock_calls) {
@@ -74,7 +74,7 @@ int write_chip(struct flashctx *flash, const uint8_t *buf, unsigned int start, u
return 0;
}
-int unlock_chip(struct flashctx *flash)
+static int unlock_chip(struct flashctx *flash)
{
printf("Unlock chip called\n");
g_chip_state.unlock_calls++;
@@ -87,7 +87,7 @@ int unlock_chip(struct flashctx *flash)
return 0;
}
-int block_erase_chip(struct flashctx *flash, unsigned int blockaddr, unsigned int blocklen)
+static int block_erase_chip(struct flashctx *flash, unsigned int blockaddr, unsigned int blocklen)
{
printf("Block erase called with blockaddr=0x%x, blocklen=0x%x\n", blockaddr, blocklen);
if (!g_chip_state.unlock_calls) {
@@ -404,7 +404,7 @@ void write_chip_with_dummyflasher_test_success(void **state)
free(newcontents);
}
-size_t verify_chip_fread(void *state, void *buf, size_t size, size_t len, FILE *fp)
+static size_t verify_chip_fread(void *state, void *buf, size_t size, size_t len, FILE *fp)
{
/*
* Verify operation compares contents of the file vs contents on the chip.