From dcc20bced51583df83e49af269ff7be5fb48dbf8 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sun, 28 Jan 2024 11:36:21 -0700 Subject: [PATCH] stand: Use modern function definitions Use modern function definitions for functions with no args. Sponsored by: Netflix --- stand/common/boot.c | 2 +- stand/efi/libefi/efinet.c | 2 +- stand/fdt/fdt_loader_cmd.c | 6 +++--- stand/libofw/ofw_console.c | 4 ++-- stand/libofw/openfirm.c | 8 ++++---- stand/libsa/bzipfs.c | 2 +- stand/libsa/powerpc/syncicache.c | 2 +- stand/uboot/main.c | 2 +- stand/uboot/net.c | 2 +- stand/uboot/uboot_console.c | 4 ++-- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/stand/common/boot.c b/stand/common/boot.c index db4bb4fc2ea8..658da097b9a9 100644 --- a/stand/common/boot.c +++ b/stand/common/boot.c @@ -160,7 +160,7 @@ command_autoboot(int argc, char *argv[]) * we haven't tried already, try now. */ void -autoboot_maybe() +autoboot_maybe(void) { char *cp; diff --git a/stand/efi/libefi/efinet.c b/stand/efi/libefi/efinet.c index 62fc203c83b5..97890c9d9b43 100644 --- a/stand/efi/libefi/efinet.c +++ b/stand/efi/libefi/efinet.c @@ -352,7 +352,7 @@ struct devsw efinet_dev = { }; static int -efinet_dev_init() +efinet_dev_init(void) { struct netif_dif *dif; struct netif_stats *stats; diff --git a/stand/fdt/fdt_loader_cmd.c b/stand/fdt/fdt_loader_cmd.c index a27ac53cb13b..eb152ae1949c 100644 --- a/stand/fdt/fdt_loader_cmd.c +++ b/stand/fdt/fdt_loader_cmd.c @@ -111,7 +111,7 @@ static const struct cmdtab commands[] = { static char cwd[FDT_CWD_LEN] = "/"; static vm_offset_t -fdt_find_static_dtb() +fdt_find_static_dtb(void) { Elf_Ehdr *ehdr; Elf_Shdr *shdr; @@ -428,7 +428,7 @@ fdt_check_overlay_compatible(void *base_fdt, void *overlay_fdt) * Returns the number of overlays successfully applied */ int -fdt_apply_overlays() +fdt_apply_overlays(void) { struct preloaded_file *fp; size_t max_overlay_size, next_fdtp_size; @@ -551,7 +551,7 @@ fdt_is_setup(void) } int -fdt_setup_fdtp() +fdt_setup_fdtp(void) { struct preloaded_file *bfp; vm_offset_t va; diff --git a/stand/libofw/ofw_console.c b/stand/libofw/ofw_console.c index 42ff045e8831..b0ead0aba198 100644 --- a/stand/libofw/ofw_console.c +++ b/stand/libofw/ofw_console.c @@ -83,7 +83,7 @@ ofw_cons_putchar(int c) static int saved_char = -1; int -ofw_cons_getchar() +ofw_cons_getchar(void) { unsigned char ch = '\0'; int l; @@ -105,7 +105,7 @@ ofw_cons_getchar() } int -ofw_cons_poll() +ofw_cons_poll(void) { unsigned char ch; diff --git a/stand/libofw/openfirm.c b/stand/libofw/openfirm.c index 211722c08e10..da0f589faa67 100644 --- a/stand/libofw/openfirm.c +++ b/stand/libofw/openfirm.c @@ -135,7 +135,7 @@ OF_test(char *name) /* Return firmware millisecond count. */ int -OF_milliseconds() +OF_milliseconds(void) { static struct { cell_t name; @@ -693,7 +693,7 @@ OF_boot(char *bootspec) /* Suspend and drop back to the Open Firmware interface. */ void -OF_enter() +OF_enter(void) { static struct { cell_t name; @@ -708,7 +708,7 @@ OF_enter() /* Shut down and drop back to the Open Firmware interface. */ void -OF_exit() +OF_exit(void) { static struct { cell_t name; @@ -723,7 +723,7 @@ OF_exit() } void -OF_quiesce() +OF_quiesce(void) { static struct { cell_t name; diff --git a/stand/libsa/bzipfs.c b/stand/libsa/bzipfs.c index 9a14380bae51..ad51e934ed9c 100644 --- a/stand/libsa/bzipfs.c +++ b/stand/libsa/bzipfs.c @@ -366,7 +366,7 @@ bz_internal_error(int errorcode) #ifdef REGRESSION /* Small test case, open and decompress test.bz2 */ -int main() +int main(void) { struct open_file f; char buf[1024]; diff --git a/stand/libsa/powerpc/syncicache.c b/stand/libsa/powerpc/syncicache.c index 0fcb1914a0da..1f99007dcdae 100644 --- a/stand/libsa/powerpc/syncicache.c +++ b/stand/libsa/powerpc/syncicache.c @@ -54,7 +54,7 @@ int cacheline_size = 0; static void getcachelinesize(void); static void -getcachelinesize() +getcachelinesize(void) { static int cachemib[] = { CTL_MACHDEP, CPU_CACHELINE }; int clen; diff --git a/stand/uboot/main.c b/stand/uboot/main.c index 6147757ced71..5a896959122e 100644 --- a/stand/uboot/main.c +++ b/stand/uboot/main.c @@ -339,7 +339,7 @@ get_load_device(int *type, int *unit, int *slice, int *partition) } static void -print_disk_probe_info() +print_disk_probe_info(void) { char slice[32]; char partition[32]; diff --git a/stand/uboot/net.c b/stand/uboot/net.c index 969724ea02df..392dd1ca45c2 100644 --- a/stand/uboot/net.c +++ b/stand/uboot/net.c @@ -100,7 +100,7 @@ static struct uboot_softc uboot_softc; * to obtain all this info again. */ static void -get_env_net_params() +get_env_net_params(void) { char *envstr; in_addr_t rootaddr, serveraddr; diff --git a/stand/uboot/uboot_console.c b/stand/uboot/uboot_console.c index d8819b8193e2..f6656309be6c 100644 --- a/stand/uboot/uboot_console.c +++ b/stand/uboot/uboot_console.c @@ -73,14 +73,14 @@ uboot_cons_putchar(int c) } static int -uboot_cons_getchar() +uboot_cons_getchar(void) { return (ub_getc()); } static int -uboot_cons_poll() +uboot_cons_poll(void) { return (ub_tstc());