From e16e74a11015259f02f5cfe26af6ea8e2ce1a270 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 3 Aug 2023 15:54:12 -0700 Subject: [PATCH] readutmp: pacify -Wstrict-prototypes * lib/readutmp.c (get_boot_time_uncached, get_boot_time): Pacify gcc 13 -Wstrict-prototypes. --- ChangeLog | 4 ++++ lib/readutmp.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a87e6537b1..1a75ea0c33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2023-08-03 Paul Eggert + readutmp: pacify -Wstrict-prototypes + * lib/readutmp.c (get_boot_time_uncached, get_boot_time): + Pacify gcc 13 -Wstrict-prototypes. + readutmp: fix idx_t FIXME in API * lib/readutmp.c (read_utmp): 2nd arg is now idx_t *, not size_t *. diff --git a/lib/readutmp.c b/lib/readutmp.c index 66314ec1db..97e92e69af 100644 --- a/lib/readutmp.c +++ b/lib/readutmp.c @@ -94,7 +94,7 @@ desirable_utmp_entry (STRUCT_UTMP const *ut, int options) /* Use systemd and Linux /proc and kernel APIs. */ static struct timeval -get_boot_time_uncached () +get_boot_time_uncached (void) { /* /proc/uptime contains the uptime with a resolution of 0.01 sec. */ FILE *fp = fopen ("/proc/uptime", "re"); @@ -147,7 +147,7 @@ get_boot_time_uncached () } static struct timeval -get_boot_time () +get_boot_time (void) { static int cached; static struct timeval boot_time; -- 2.39.5