diff options
author | Anastasia Klimchuk <aklm@chromium.org> | 2022-04-12 13:29:41 +1000 |
---|---|---|
committer | Anastasia Klimchuk <aklm@chromium.org> | 2022-04-29 04:24:33 +0000 |
commit | 402e5d697c1ea09ef48bc09cbd4f743a7d44bc52 (patch) | |
tree | 022e654e2ccf1d6a523b3de7f6f6d5d889c14596 /tests/lifecycle.c | |
parent | f81c1c9d0ad8e83649e5bc3c7052e0c67aff0ba6 (diff) | |
download | flashrom-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/lifecycle.c')
-rw-r--r-- | tests/lifecycle.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lifecycle.c b/tests/lifecycle.c index 825654f9..236d1d7b 100644 --- a/tests/lifecycle.c +++ b/tests/lifecycle.c @@ -228,13 +228,13 @@ void raiden_debug_basic_lifecycle_test_success(void **state) #endif } -int dediprog_libusb_init(void *state, libusb_context **ctx) +static int dediprog_libusb_init(void *state, libusb_context **ctx) { *ctx = not_null(); return 0; } -int dediprog_libusb_control_transfer(void *state, +static int dediprog_libusb_control_transfer(void *state, libusb_device_handle *devh, uint8_t bmRequestType, uint8_t bRequest, @@ -274,7 +274,7 @@ struct linux_mtd_io_state { char *fopen_path; }; -FILE *linux_mtd_fopen(void *state, const char *pathname, const char *mode) +static FILE *linux_mtd_fopen(void *state, const char *pathname, const char *mode) { struct linux_mtd_io_state *io_state = state; @@ -283,7 +283,7 @@ FILE *linux_mtd_fopen(void *state, const char *pathname, const char *mode) return not_null(); } -size_t linux_mtd_fread(void *state, void *buf, size_t size, size_t len, FILE *fp) +static size_t linux_mtd_fread(void *state, void *buf, size_t size, size_t len, FILE *fp) { struct linux_mtd_fread_mock_entry { const char *path; @@ -317,7 +317,7 @@ size_t linux_mtd_fread(void *state, void *buf, size_t size, size_t len, FILE *fp return 0; } -int linux_mtd_fclose(void *state, FILE *fp) +static int linux_mtd_fclose(void *state, FILE *fp) { struct linux_mtd_io_state *io_state = state; @@ -372,7 +372,7 @@ static int linux_spi_ioctl(void *state, int fd, unsigned long request, va_list a return 0; } -char *linux_spi_fgets(void *state, char *buf, int len, FILE *fp) +static char *linux_spi_fgets(void *state, char *buf, int len, FILE *fp) { /* Emulate reading max buffer size from sysfs. */ const char *max_buf_size = "1048576"; |