Closed nickbianco closed 9 months ago
Overall, looks fine and you can merge it etc. but, just in case you end up refactoring stuff like this later, a safer pattern for snprintf with stack-allocated buffers is:
std::array<char, 128> buf;
std::snprintf(buf.data(), buf.size(), "blah %i", i);
Because there's one unambiguous location for the size of the buffer
(not dissing this PR: the existence of these snprintf
s are clearly legacy)
I've addressed @adamkewley's specific comment. Let's switch to the safer buffer pattern in a future PR.
Brief summary of changes
This PR is mainly intended to address any remaining
gcc
compiler warnings not suppressed in the previous two PRs (#3657 and #3658). The changes include:sprintf
tosnprintf
conversions that I missed in #3658.cout
statement with active logging statements.CoordinateCouplerConstraint
that using&
instead of&&
.size_t
iterator toint
inSmoothSegmentedFunction
(to avoid an implicit conversion in the loop).Testing I've completed
Looking for feedback on...
CHANGELOG.md (choose one)
This change is