Page MenuHomeFreeBSD

Fix various -Wpointer-compare warnings
ClosedPublic

Authored by jrtc27_jrtc27.com on Sun, Oct 6, 3:16 PM.

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

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

brooks added a comment.Tue, Oct 8, 9:00 PM

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.Tue, Oct 8, 9:14 PM
This revision was automatically updated to reflect the committed changes.