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)
Feb 23 2024, 10:38 AM
Unknown Object (File)
Dec 31 2023, 12:10 AM
Unknown Object (File)
Dec 20 2023, 2:45 AM
Unknown Object (File)
Dec 3 2023, 11:32 AM
Unknown Object (File)
Dec 3 2023, 11:32 AM
Unknown Object (File)
Dec 3 2023, 11:32 AM
Unknown Object (File)
Dec 3 2023, 11:18 AM
Unknown Object (File)
Nov 24 2023, 4:43 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

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

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.