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
Unknown Object (File)
Sun, Apr 7, 12:28 PM
Unknown Object (File)
Feb 27 2024, 1:12 PM
Unknown Object (File)
Feb 27 2024, 8:59 AM
Unknown Object (File)
Feb 14 2024, 5:22 AM
Unknown Object (File)
Feb 14 2024, 5:22 AM
Unknown Object (File)
Feb 14 2024, 5:13 AM
Unknown Object (File)
Feb 14 2024, 5:00 AM
Unknown Object (File)
Dec 20 2023, 4: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