There are more than 5000 warnings issued during "make buildworld". Some of them are false positives, but some of them are sign of true errors. Nobody is upset by warnings due it's amount, so some errors remain uncorrected. I want to cleanup the code-base from warnings, so warnings will become "attention mark" again. usr.sbin/bootparamd/callbootd/callbootd.c:83: warning: 'clnt' might be used uninitialized in this function bootparam_prot_clnt.c:24: warning: implicit declaration of function `memset' How-To-Repeat: N/A
The bootparamd code needs quite a few more changes to make it compile with WARNS=6 with GCC 4. I've attached a patch for callbootd/callbootd.c, but changes are also needed for bootparamd/bootparamd.c -- Bruce Cran
I have attached a patch which fixes some of the problems with bootparamd/bootparamd.c and bootparamd/main.c. More changes are required to bootparamd.c for it to compile with WARNS=6 though. -- Bruce Cran
A commit references this bug: Author: ngie Date: Tue Nov 10 11:19:37 UTC 2015 New revision: 290645 URL: https://svnweb.freebsd.org/changeset/base/290645 Log: Fix some trivial warnings with bootparamd/main.c - Convert K&R to something a bit less ancient - Remove an incorrect, duplicate prototype for bootparamprog_1(..) MFC after: 1 week PR: 71667 Submitted by: bcran Sponsored by: EMC / Isilon Storage Division Changes: head/usr.sbin/bootparamd/bootparamd/main.c
A commit references this bug: Author: ngie Date: Thu Nov 19 00:14:23 UTC 2015 New revision: 291042 URL: https://svnweb.freebsd.org/changeset/base/291042 Log: MFC r290645: Fix some trivial warnings with bootparamd/main.c - Convert K&R to something a bit less ancient - Remove an incorrect, duplicate prototype for bootparamprog_1(..) PR: 71667 Submitted by: bcran Sponsored by: EMC / Isilon Storage Division Changes: _U stable/10/ stable/10/usr.sbin/bootparamd/bootparamd/main.c
A commit references this bug: Author: ngie Date: Thu Nov 19 00:19:09 UTC 2015 New revision: 291043 URL: https://svnweb.freebsd.org/changeset/base/291043 Log: MFstable/10 r291042: MFC r290645: Fix some trivial warnings with bootparamd/main.c - Convert K&R to something a bit less ancient - Remove an incorrect, duplicate prototype for bootparamprog_1(..) PR: 71667 Submitted by: bcran Sponsored by: EMC / Isilon Storage Division Changes: _U stable/9/ _U stable/9/usr.sbin/ _U stable/9/usr.sbin/bootparamd/ stable/9/usr.sbin/bootparamd/bootparamd/main.c
A commit references this bug: Author: ngie Date: Thu Aug 17 20:37:02 UTC 2017 New revision: 322635 URL: https://svnweb.freebsd.org/changeset/base/322635 Log: Fix WARNS - Remove ad hoc inet_ntoa prototype declaration; it's already handled by the included headers. - De-K&Rify the function prototypes for eachres_whoami(..), eachres_getfile(..), and main(..). MFC after: 1 week PR: 71667 Tested with: clang (5.0), gcc (4.2.1, 5) Changes: head/usr.sbin/bootparamd/callbootd/callbootd.c
A lot of these warnings were fixed in the clang integration project BTW.
(In reply to Ngie Cooper from comment #7) May be, but despite of it, there are 10648 warnings fired during compilation of 11.0-RELEASE-p12. But I'm not going to analyze them in attempt to identify possible race conditions and bug. I spent so much time to something like it 13 years ago and I'm not willing to do it again as it seems to be pure waste of time. Even those PR related to true bugs and race conditions (e.g. no just meaningless warning) has been left untouched for years. It seems commiters doesn't support/welcome neither bug hunting nor cleanup of code in attempt to help bug hunters. But thank you very much for the time you spent to process this 13 years old PR.
A commit references this bug: Author: ngie Date: Sat Sep 30 20:50:32 UTC 2017 New revision: 324142 URL: https://svnweb.freebsd.org/changeset/base/324142 Log: MFC r322635: Fix WARNS - Remove ad hoc inet_ntoa prototype declaration; it's already handled by the included headers. - De-K&Rify the function prototypes for eachres_whoami(..), eachres_getfile(..), and main(..). PR: 71667 Tested with: clang (5.0), gcc (4.2.1, 5) Changes: _U stable/10/ stable/10/usr.sbin/bootparamd/callbootd/callbootd.c
I have no way to test this. Untaking.
I'll take.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=e03764d931d820185a019334259b18df2e3f6b6c commit e03764d931d820185a019334259b18df2e3f6b6c Author: Yoshihiro Takahashi <nyan@FreeBSD.org> AuthorDate: 2021-01-02 03:36:09 +0000 Commit: Yoshihiro Takahashi <nyan@FreeBSD.org> CommitDate: 2021-01-02 03:36:09 +0000 bootparamd: Fix several warnings and increase warn level to 6. - Increase WARNS to 6. - Except -Wcast-align and -Wincompatible-pointer-types-discards-qualifiers checks. - Use ANSI C prototype. - Statically variables and functions. - Add extern declaration for global variables. - Rename local variables to resolve shadow warnings. PR: 71667 MFC after: 2 weeks usr.sbin/bootparamd/Makefile.inc | 4 +- usr.sbin/bootparamd/bootparamd/bootparamd.c | 83 +++++++++++++---------------- usr.sbin/bootparamd/bootparamd/main.c | 15 +++--- usr.sbin/bootparamd/callbootd/callbootd.c | 26 ++++----- 4 files changed, 59 insertions(+), 69 deletions(-)
Thank you very for taking this 17 years old challenge.
A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=b96f027b71024cccc475d4d9f69176d372956756 commit b96f027b71024cccc475d4d9f69176d372956756 Author: Yoshihiro Takahashi <nyan@FreeBSD.org> AuthorDate: 2021-01-02 03:36:09 +0000 Commit: Yoshihiro Takahashi <nyan@FreeBSD.org> CommitDate: 2021-01-19 14:55:16 +0000 bootparamd: Fix several warnings and increase warn level to 6. - Increase WARNS to 6. - Except -Wcast-align and -Wincompatible-pointer-types-discards-qualifiers checks. - Use ANSI C prototype. - Statically variables and functions. - Add extern declaration for global variables. - Rename local variables to resolve shadow warnings. PR: 71667 (cherry picked from commit e03764d931d820185a019334259b18df2e3f6b6c) usr.sbin/bootparamd/Makefile.inc | 4 +- usr.sbin/bootparamd/bootparamd/bootparamd.c | 83 +++++++++++++---------------- usr.sbin/bootparamd/bootparamd/main.c | 15 +++--- usr.sbin/bootparamd/callbootd/callbootd.c | 26 ++++----- 4 files changed, 59 insertions(+), 69 deletions(-)
Commited. Thanks.