diff options
| author | David Kalnischkies <david@kalnischkies.de> | 2024-09-11 16:57:04 +0000 |
|---|---|---|
| committer | David Kalnischkies <david@kalnischkies.de> | 2024-11-22 12:11:13 +0000 |
| commit | fa19a9ddbdddeaed44480ce7dade11d526336435 (patch) | |
| tree | 26e4358a08df89076a74ac664b569690c6baabd7 /test/libapt/stringview_test.cc | |
| parent | dcb81196776f5c31063e5f57104b4b021f37aa00 (diff) | |
Acknowledge non-erase usage of remove_if for volatile sources
gcc produces a length warning starting with:
| warning: ignoring return value of ‘_FIter std::remove_if(_FIter, _FIter, _Predicate) [with …]’, declared with attribute ‘nodiscard’ [-Wunused-result]
which is usually correct, but in the usage here we don't want to call an
erase as we operate on a c-style new[] array here which contains pointers
into argv and has an explicit sentinel (nullptr) – FileSize() is based
on this sentinel.
Casting to void silences the warning as is standard practice and
hopefully indicates better that this is intended than ignoring the
warning for the casual on-looker.
Diffstat (limited to 'test/libapt/stringview_test.cc')
0 files changed, 0 insertions, 0 deletions
