Debian Patches

Status for persistent-cache-cpp/1.0.7-2

Patch Description Author Forwarded Bugs Origin Last update
1001_fix-setfill-not-defined-in-scope.patch [PATCH] tests/core/persistent_string_cache/speed_test.cpp: Add missing include of <iomanip>.

This resolves the following issue, recently having occurred in Debian unstable (possibly due to GCC-14 bump):

```
[ 84%] Building CXX object tests/core/persistent_string_cache/CMakeFiles/speed_test.dir/speed_test.cpp.o
cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/tests/core/persistent_string_cache && /usr/bin/c++ -DGTEST_VERSION_MAJOR=1 -DGTEST_VERSION_MINOR=15 -DGTEST_VERSION_PATCH=0 -DTEST_DIR=\"/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/tests/core/persistent_string_cache\" -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/tests/core/persistent_string_cache -I/<<PKGBUILDDIR>>/tests/core/persistent_string_cache -I/<<PKGBUILDDIR>>/include -isystem /usr/src/googletest/googlemock/include -isystem /usr/src/googletest/googletest/include -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 --std=c++14 -Wall -pedantic -Wextra -Wcast-align -Wcast-qual -Wformat -Wredundant-decls -Wswitch-default -Wnon-virtual-dtor -Wctor-dtor-privacy -Wold-style-cast -MD -MT tests/core/persistent_string_cache/CMakeFiles/speed_test.dir/speed_test.cpp.o -MF CMakeFiles/speed_test.dir/speed_test.cpp.o.d -o CMakeFiles/speed_test.dir/speed_test.cpp.o -c /<<PKGBUILDDIR>>/tests/core/persistent_string_cache/speed_test.cpp
/<<PKGBUILDDIR>>/tests/core/persistent_string_cache/persistent_string_cache_test.cpp: In member function ‘virtual void PersistentStringCache_stats_Test::TestBody()’:
/<<PKGBUILDDIR>>/tests/core/persistent_string_cache/persistent_string_cache_test.cpp:372:53: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
372 | PersistentCacheStats s4(move(c->stats()));
| ^
/<<PKGBUILDDIR>>/tests/core/persistent_string_cache/persistent_string_cache_test.cpp:372:53: note: remove ‘std::move’ call
/<<PKGBUILDDIR>>/tests/core/persistent_string_cache/speed_test.cpp: In function ‘std::string make_key(int, int)’:
/<<PKGBUILDDIR>>/tests/core/persistent_string_cache/speed_test.cpp:99:10: error: ‘setfill’ was not declared in this scope
99 | s << setfill('0') << setw(keylen) << random_int(0, max_key);
| ^~~~~~~
/<<PKGBUILDDIR>>/tests/core/persistent_string_cache/speed_test.cpp:32:1: note: ‘std::setfill’ is defined in header ‘<iomanip>’; this is probably fixable by adding ‘#include <iomanip>’
31 | #include <thread>
+++ |+#include <iomanip>
32 |
/<<PKGBUILDDIR>>/tests/core/persistent_string_cache/speed_test.cpp:99:26: error: ‘setw’ was not declared in this scope
99 | s << setfill('0') << setw(keylen) << random_int(0, max_key);
| ^~~~
/<<PKGBUILDDIR>>/tests/core/persistent_string_cache/speed_test.cpp:99:26: note: ‘std::setw’ is defined in header ‘<iomanip>’; this is probably fixable by adding ‘#include <iomanip>’
/<<PKGBUILDDIR>>/tests/core/persistent_string_cache/speed_test.cpp: In member function ‘virtual void PersistentStringCache_basic_Test::TestBody()’:
/<<PKGBUILDDIR>>/tests/core/persistent_string_cache/speed_test.cpp:151:14: error: ‘setfill’ was not declared in this scope
151 | s << setfill('0') << setw(keylen) << i;
| ^~~~~~~
/<<PKGBUILDDIR>>/tests/core/persistent_string_cache/speed_test.cpp:151:14: note: ‘std::setfill’ is defined in header ‘<iomanip>’; this is probably fixable by adding ‘#include <iomanip>’
/<<PKGBUILDDIR>>/tests/core/persistent_string_cache/speed_test.cpp:151:30: error: ‘setw’ was not declared in this scope
151 | s << setfill('0') << setw(keylen) << i;
| ^~~~
/<<PKGBUILDDIR>>/tests/core/persistent_string_cache/speed_test.cpp:151:30: note: ‘std::setw’ is defined in header ‘<iomanip>’; this is probably fixable by adding ‘#include <iomanip>’
make[3]: *** [tests/core/persistent_string_cache/CMakeFiles/speed_test.dir/build.make:79: tests/core/persistent_string_cache/CMakeFiles/speed_test.dir/speed_test.cpp.o] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
make[2]: *** [CMakeFiles/Makefile2:1270: tests/core/persistent_string_cache/CMakeFiles/speed_test.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
```
Mike Gabriel <mike.gabriel@das-netzwerkteam.de> no 2024-08-14

All known versions for source package 'persistent-cache-cpp'

Links