Page MenuHomeFreeBSD

dhclient: raise WARNS to 4
ClosedPublic

Authored by asomers on Feb 21 2018, 6:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 28, 8:22 AM
Unknown Object (File)
Sat, Oct 25, 11:09 PM
Unknown Object (File)
Sat, Oct 25, 11:09 PM
Unknown Object (File)
Sat, Oct 25, 11:09 PM
Unknown Object (File)
Sat, Oct 25, 4:43 PM
Unknown Object (File)
Sat, Oct 25, 3:36 AM
Unknown Object (File)
Tue, Oct 14, 3:24 AM
Unknown Object (File)
Aug 3 2025, 1:02 AM
Subscribers

Details

Summary

dhclient: raise WARNS to 4

Mostly const-correctness fixes. There were also some variable-shadowing,
unused variable, and a couple of sockaddr type-correctness changes. I also had
trouble with cast-align warnings. I was able to prove that one of them was a
false positive. But ultimately I had to disable the warning program-wide to
deal with the others.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Looks good. Two questions below

sbin/dhclient/dispatch.c
106 ↗(On Diff #39574)

Should this be the _Alignof the pointer type or the struct type?

109 ↗(On Diff #39574)

Is this needed with the NO_WCAST_ALIGN Makefile variable?

This revision is now accepted and ready to land.Feb 21 2018, 8:36 PM
sbin/dhclient/dispatch.c
106 ↗(On Diff #39574)

Good catch.

109 ↗(On Diff #39574)

Technically no. But it will be needed if anybody ever reenables WCAST_ALIGN and fixes the other violations.

This revision was automatically updated to reflect the committed changes.