Page MenuHomeFreeBSD

Fix various -Wpointer-compare warnings
ClosedPublic

Authored by jrtc27 on Oct 6 2019, 3:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 28, 6:57 AM
Unknown Object (File)
Sun, Jun 22, 3:46 PM
Unknown Object (File)
Fri, Jun 20, 10:52 PM
Unknown Object (File)
Fri, Jun 20, 7:23 AM
Unknown Object (File)
Fri, Jun 13, 6:31 AM
Unknown Object (File)
May 16 2025, 12:17 AM
Unknown Object (File)
Apr 14 2025, 8:50 AM
Unknown Object (File)
Apr 14 2025, 4:15 AM
Subscribers

Details

Summary

This warning (comparing a pointer against a zero character literal
rather than NULL) has existed since GCC 7.1.0, and was recently added to
Clang trunk. Almost all of these are harmless, except for fwcontrol's
str2node, which needs to both guard against dereferencing a NULL
pointer (though in practice it appears none of the callers will ever
pass one in), as well as ensure it doesn't parse the empty string as
node 0 due to strtol's awkward interface.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26898
Build 25209: arc lint + arc unit

Event Timeline

I've merged the tcsh changes in via an update to tcsh 6.21.00 in rS353325.

This revision was not accepted when it landed; it landed in state Needs Review.Oct 8 2019, 9:14 PM
This revision was automatically updated to reflect the committed changes.