git: c3c2233c9673 - stable/14 - gpioevents: Fix build with newer Clang

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Sun, 24 Mar 2024 17:49:28 UTC
The branch stable/14 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=c3c2233c9673f6ce39109d26f934b848b3749b18

commit c3c2233c9673f6ce39109d26f934b848b3749b18
Author:     John F. Carr <jfc@mit.edu>
AuthorDate: 2024-03-02 15:38:04 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-03-24 17:48:55 +0000

    gpioevents: Fix build with newer Clang
    
    PR:             277422
    (cherry picked from commit 42b117a4bd104246589149fa9f7b9b7ddc144f23)
---
 tools/test/gpioevents/Makefile     | 2 ++
 tools/test/gpioevents/gpioevents.c | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/test/gpioevents/Makefile b/tools/test/gpioevents/Makefile
index 7976bd03174a..4bc4422ae333 100644
--- a/tools/test/gpioevents/Makefile
+++ b/tools/test/gpioevents/Makefile
@@ -8,4 +8,6 @@ MK_MAN= no
 
 BINDIR= /usr/bin
 
+CWARNFLAGS += -Wno-gnu-folding-constant
+
 .include <bsd.prog.mk>
diff --git a/tools/test/gpioevents/gpioevents.c b/tools/test/gpioevents/gpioevents.c
index f1bc8e8ee224..43bad610cb68 100644
--- a/tools/test/gpioevents/gpioevents.c
+++ b/tools/test/gpioevents/gpioevents.c
@@ -61,7 +61,7 @@ sigio_handler(int sig __unused){
 }
 
 static void
-usage()
+usage(void)
 {
 	fprintf(stderr, "usage: %s [-f ctldev] [-m method] [-s] [-n] [-S] [-u]"
 	    "[-t timeout] [-d delay-usec] pin intr-config pin-mode [pin intr-config pin-mode ...]\n\n",
@@ -152,7 +152,7 @@ print_poll_events(short event)
 }
 
 static void
-calc_utc_offset()
+calc_utc_offset(void)
 {
 	struct timespec monotime, utctime;