You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there , libkiwix compilation is failing for me (latest master) :(
Environment : Ubuntu 21.10, GCC 11.2.0
I can get around with doing werror=false but maybe that shouldn't be done :>
[86/88] Compiling C++ object test/server.p/server.cpp.o
FAILED: test/server.p/server.cpp.o
c++ -Itest/server.p -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include/p11-kit-1 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Werror -std=c++11 -g -pthread -isystem../subprojects/googletest-release-1.8.1/googletest -isystemsubprojects/googletest-release-1.8.1/googletest -isystem../subprojects/googletest-release-1.8.1/googletest/include -MD -MQ test/server.p/server.cpp.o -MF test/server.p/server.cpp.o.d -o test/server.p/server.cpp.o -c ../test/server.cpp
In file included from ../test/server.cpp:2:
../test/./httplib.h: In member function ‘ssize_t httplib::Stream::write_format(const char*, const Args& ...) [with Args = {const char*, const char*}]’:
../test/./httplib.h:2897:42: error: ‘buf’ may be used uninitialized [-Werror=maybe-uninitialized]
2897 | auto sn = snprintf(buf.data(), buf.size() - 1, fmt, args...);
| ~~~~~~~~^~
In file included from ../test/./httplib.h:134,
from ../test/server.cpp:2:
/usr/include/c++/11/array:176:7: note: by argument 1 of type ‘const std::array<char, 2048>*’ to ‘constexpr std::array<_Tp, _Nm>::size_type std::array<_Tp, _Nm>::size() const [with _Tp = char; long unsigned int _Nm = 2048]’ declared here
176 | size() const noexcept { return _Nm; }
| ^~~~
In file included from ../test/server.cpp:2:
../test/./httplib.h:2892:26: note: ‘buf’ declared here
2892 | std::array<char, 2048> buf;
| ^~~
../test/./httplib.h: In member function ‘ssize_t httplib::Stream::write_format(const char*, const Args& ...) [with Args = {int, const char*}]’:
../test/./httplib.h:2897:42: error: ‘buf’ may be used uninitialized [-Werror=maybe-uninitialized]
2897 | auto sn = snprintf(buf.data(), buf.size() - 1, fmt, args...);
| ~~~~~~~~^~
In file included from ../test/./httplib.h:134,
from ../test/server.cpp:2:
/usr/include/c++/11/array:176:7: note: by argument 1 of type ‘const std::array<char, 2048>*’ to ‘constexpr std::array<_Tp, _Nm>::size_type std::array<_Tp, _Nm>::size() const [with _Tp = char; long unsigned int _Nm = 2048]’ declared here
176 | size() const noexcept { return _Nm; }
| ^~~~
In file included from ../test/server.cpp:2:
../test/./httplib.h:2892:26: note: ‘buf’ declared here
2892 | std::array<char, 2048> buf;
| ^~~
../test/./httplib.h: In member function ‘bool httplib::Client::read_response_line(httplib::Stream&, httplib::Response&)’:
../test/./httplib.h:3761:70: error: ‘buf’ may be used uninitialized [-Werror=maybe-uninitialized]
3761 | detail::stream_line_reader line_reader(strm, buf.data(), buf.size());
| ^
In file included from ../test/./httplib.h:134,
from ../test/server.cpp:2:
/usr/include/c++/11/array:176:7: note: by argument 1 of type ‘const std::array<char, 2048>*’ to ‘constexpr std::array<_Tp, _Nm>::size_type std::array<_Tp, _Nm>::size() const [with _Tp = char; long unsigned int _Nm = 2048]’ declared here
176 | size() const noexcept { return _Nm; }
| ^~~~
In file included from ../test/server.cpp:2:
../test/./httplib.h:3759:26: note: ‘buf’ declared here
3759 | std::array<char, 2048> buf;
| ^~~
cc1plus: all warnings being treated as errors
ninja: build stopped: subcommand failed.
The text was updated successfully, but these errors were encountered:
This is a issue on the dependency httplib (embedded in our test directory).
The fix I've made is here : yhirose/cpp-httplib#1085 (comment)
I've have a draft PR (#633) which apply the patch on our source but it also update the httplib version and now it fails because somehow httplib client cannot access the server.
Hi there , libkiwix compilation is failing for me (latest master) :(
Environment : Ubuntu 21.10, GCC 11.2.0
I can get around with doing werror=false but maybe that shouldn't be done :>
The text was updated successfully, but these errors were encountered: