Bug 271072 - [exp-run] -Wstrict-prototypes
Summary: [exp-run] -Wstrict-prototypes
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-25 22:09 UTC by John Baldwin
Modified: 2023-05-26 21:18 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Baldwin freebsd_committer freebsd_triage 2023-04-25 22:09:15 UTC
Please apply the patches from https://reviews.freebsd.org/D39732 and https://reviews.freebsd.org/D39734 to re-enable -Wstrict-prototypes for clang 15.  You will want a world of at least 7aab8fc5c5f0f26e494be3bc05c58cf38687cf69 to apply these patches to.

This should only affect ports that use bsd.*.mk for their build infrastructure.  The two ports I have open reviews for from the last exp-run for -Wdeprecated-non-prototype do build with this once the patches I have for the ports are applied (misc/ctm and mail/rblcheck).
Comment 1 Antoine Brodin freebsd_committer freebsd_triage 2023-04-26 09:31:29 UTC
buildworld fails:

/poudriere/data/src-PR271072/usr.sbin/arp/arp_netlink.c:94:10: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
get_myfib()
         ^
          void
Comment 2 John Baldwin freebsd_committer freebsd_triage 2023-04-26 17:45:49 UTC
Sigh, that's a recent breakage.  I'll fix and let you know of a hash you can use.
Comment 3 John Baldwin freebsd_committer freebsd_triage 2023-04-26 20:20:48 UTC
The commit hash 2d7842d0bfb4257c5b1aba5c1e6f79e47735d71c should work.
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-05-25 14:12:47 UTC
A commit in branch main references this bug:

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

commit 6c08fd3dc804c9c3064add3b9a6ff678a541d210
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2023-05-25 14:11:38 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-05-25 14:11:38 +0000

    Enable -Wstrict-prototypes by default in the kernel for clang 15+.

    PR:             271072 (exp-run)
    Reviewed by:    emaste
    Differential Revision:  https://reviews.freebsd.org/D39734

 sys/conf/kern.mk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Comment 6 commit-hook freebsd_committer freebsd_triage 2023-05-25 14:12:48 UTC
A commit in branch main references this bug:

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

commit 3dad1c6696d2b86d7c4662b509f09b91f7f1aed4
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2023-05-25 14:11:38 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-05-25 14:11:38 +0000

    Enable -Wstrict-prototypes for all clang versions at WARNS >= 3.

    Previously clang 15+ only enabled it for WARNS >= 5.

    PR:             271072 (exp-run)
    Reviewed by:    emaste
    Differential Revision:  https://reviews.freebsd.org/D39732

 share/mk/bsd.sys.mk | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)