Fedora 38 compilation error
Compilation error encountered on Fedora 38 in Kea 2.5.1 rc1
Compilation error
CXX run_unittests-rdata_unittest.o
rdata_unittest.cc: In static member function ‘static std::string {anonymous}::Rdata_Unknown_Test::getLongestRdataTxt()’:
rdata_unittest.cc:257:16: error: ‘setw’ was not declared in this scope
257 | oss << setw(2) << (i & 0xff);
| ^~~~
rdata_unittest.cc:29:1: note: ‘std::setw’ is defined in header ‘<iomanip>’; did you forget to ‘#include <iomanip>’?
28 | #include <boost/lexical_cast.hpp>
+++ |+#include <iomanip>
29 |
Warning:
In file included from stamped_value_unittest.cc:12:
In function ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = int; T2 = long int]’,
inlined from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = int; T2 = long int; typename std::enable_if<((! std::is_integral<_Tp>::value) || (! std::is_pointer<_T2>::value))>::type* <anonymous> = 0]’ at /home/mgodzina/googletest/googletest/include/gtest/gtest.h:1397:64,
inlined from ‘virtual void {anonymous}::StampedValueTest_createFromInteger_Test::TestBody()’ at stamped_value_unittest.cc:68:5:
/home/mgodzina/googletest/googletest/include/gtest/gtest.h:1378:11: warning: ‘signed_integer’ may be used uninitialized [-Wmaybe-uninitialized]
1378 | if (lhs == rhs) {
| ~~~~^~~~~~
stamped_value_unittest.cc: In member function ‘virtual void {anonymous}::StampedValueTest_createFromInteger_Test::TestBody()’:
stamped_value_unittest.cc:66:13: note: ‘signed_integer’ declared here
66 | int64_t signed_integer;
| ^~~~~~~~~~~~~~
Error and warning discovered by Razvan and confirmed by me.
Edited by Marcin Godzina