Bug 255390 - FIB_ALGO fails to build without VIMAGE due to -Werror
Summary: FIB_ALGO fails to build without VIMAGE due to -Werror
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Alexander V. Chernikov
URL:
Keywords: needs-patch
Depends on:
Blocks:
 
Reported: 2021-04-25 12:46 UTC by Jan Beich
Modified: 2021-05-03 17:12 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2021-04-25 12:46:09 UTC
Exposed by src 6993187a8c30

$ cat sys/amd64/conf/MYKERNEL
include GENERIC-NODEBUG
ident MYKERNEL
nooption VIMAGE

$ make buildkernel
[...]
sys/net/route/fib_algo.c:592:28: error: variable 'bucket_time_ms' is uninitialized when used within its own initialization [-Werror,-Wuninitialized]
        uint32_t bucket_time_ms = V_bucket_time_ms;
                 ~~~~~~~~~~~~~~   ^~~~~~~~~~~~~~~~
sys/net/route/fib_algo.c:112:31: note: expanded from macro 'V_bucket_time_ms'
#define V_bucket_time_ms        VNET(bucket_time_ms)
                                     ^~~~~~~~~~~~~~
sys/net/vnet.h:436:20: note: expanded from macro 'VNET'
#define VNET(n)                 (n)
                                 ^
1 error generated.
Comment 1 commit-hook freebsd_committer freebsd_triage 2021-04-25 19:54:14 UTC
A commit in branch main references this bug:

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

commit 7d222ce3c10bdc23c8dc92d6b13e376ede5840d5
Author:     Alexander V. Chernikov <melifaro@FreeBSD.org>
AuthorDate: 2021-04-21 04:52:38 +0000
Commit:     Alexander V. Chernikov <melifaro@FreeBSD.org>
CommitDate: 2021-04-21 04:53:42 +0000

    Fix NOINET[6],!VIMAGE builds after FIB_ALGO addition to GENERIC

    Reported by:    jbeich
    PR:             255390

 sys/net/route/fib_algo.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-04-29 09:18:09 UTC
A commit in branch stable/13 references this bug:

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

commit 2c0d16218efa5db40b8e3f0a0326fb0438faa4a1
Author:     Alexander V. Chernikov <melifaro@FreeBSD.org>
AuthorDate: 2021-04-21 04:52:38 +0000
Commit:     Alexander V. Chernikov <melifaro@FreeBSD.org>
CommitDate: 2021-04-29 08:47:32 +0000

    Fix NOINET[6],!VIMAGE builds after FIB_ALGO addition to GENERIC

    Reported by:    jbeich
    PR:             255390

    (cherry picked from commit 7d222ce3c10bdc23c8dc92d6b13e376ede5840d5)

 sys/net/route/fib_algo.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)