Bug 277422 - Fix build of tools/test/gpioevents
Summary: Fix build of tools/test/gpioevents
Status: In Progress
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 15.0-CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Ed Maste
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-01 21:16 UTC by John F. Carr
Modified: 2024-03-24 17:49 UTC (History)
1 user (show)

See Also:


Attachments
Patch to fix compilation of gpioevents (1.08 KB, text/plain)
2024-03-01 21:16 UTC, John F. Carr
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John F. Carr 2024-03-01 21:16:16 UTC
Created attachment 248857 [details]
Patch to fix compilation of gpioevents

tools/test/gpioevents has bit-rotted and triggers errors from clang 17.  Patch attached.

Building /usr/obj/usr/src/arm64.aarch64/tools/test/gpioevents/gpioevents.o
/usr/src/tools/test/gpioevents/gpioevents.c:64:6: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   64 | usage()
      |      ^
      |       void
/usr/src/tools/test/gpioevents/gpioevents.c:155:16: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  155 | calc_utc_offset()
      |                ^
      |                 void
/usr/src/tools/test/gpioevents/gpioevents.c:213:35: error: variable length array folded to constant array as an extension [-Werror,-Wgnu-folding-constant]
  213 |                 const struct gpio_event_summary sum[numrecs];
      |                                                 ^
/usr/src/tools/test/gpioevents/gpioevents.c:214:35: error: variable length array folded to constant array as an extension [-Werror,-Wgnu-folding-constant]
  214 |                 const struct gpio_event_detail  det[numrecs];
      |                                                 ^
4 errors generated.
*** Error code 1

Stop.
Comment 1 commit-hook freebsd_committer freebsd_triage 2024-03-02 15:40:04 UTC
A commit in branch main references this bug:

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

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

    gpioevents: Fix build with newer Clang

    PR:             277422

 tools/test/gpioevents/Makefile     | 2 ++
 tools/test/gpioevents/gpioevents.c | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-03-24 17:49:42 UTC
A commit in branch stable/14 references this bug:

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(-)