Page MenuHomeFreeBSD

rs: Convert to C++ to convert elem to a std::vector<char *>.
ClosedPublic

Authored by jhb on Sep 29 2022, 10:48 PM.
Tags
None
Referenced Files
F82725756: D36833.id111253.diff
Thu, May 2, 12:43 AM
F82725751: D36833.id113173.diff
Thu, May 2, 12:43 AM
F82725746: D36833.id.diff
Thu, May 2, 12:43 AM
Unknown Object (File)
Thu, Apr 25, 10:04 PM
Unknown Object (File)
Thu, Apr 25, 10:04 PM
Unknown Object (File)
Thu, Apr 25, 10:04 PM
Unknown Object (File)
Thu, Apr 25, 2:54 PM
Unknown Object (File)
Thu, Apr 25, 12:19 AM
Subscribers

Details

Summary

This also updates various indices and counters from int to size_t to
pacify resulting -Wsign-compare warnings.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Sep 29 2022, 10:48 PM
usr.bin/rs/rs.cc
181

Nothing seemed to depend on this NULL being present, and nelem doesn't include it.

318

This seems like dead code. At line 280 above in the old code we set nelem to n above. The only way we wouldn't execute that line was if lp already fit which would imply that nelem was greater than orows * ocols on function entry. Either way, nelem would never be larger than n if the RECYCLE flag was set.

This might need a fixup depends rule due to rs.c being renamed to rs.cc.

This revision is now accepted and ready to land.Sep 29 2022, 11:20 PM