TaSK
TaSK copied to clipboard
Compiling failed! mbedTLS!
Hi,
I tried to compile the tlstesttool as described in the README, but got the following error:
/home/Documents/TaSK/tlstesttool/src/tls/mbedtls/TlsSession.cpp: In function ‘std::string TlsTestTool::MbedTls::errorToString(int)’: /home/Documents/TaSK/tlstesttool/src/tls/mbedtls/TlsSession.cpp:144:25: error: ‘str’ may be used uninitialized [-Werror=maybe-uninitialized] 144 | mbedtls_strerror(errorCode, str.data(), str.size()); | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /home/Documents/TaSK/tlstesttool/src/tls/mbedtls/../../tls/TlsNumbers.h:21, from /home/Documents/TaSK/tlstesttool/src/tls/mbedtls/../../tls/TlsHashAlgorithm.h:21, from /home/Documents/TaSK/tlstesttool/src/tls/mbedtls/../../tls/TlsSession.h:25, from /home/Documents/TaSK/tlstesttool/src/tls/mbedtls/TlsSession.h:21, from /home/Documents/TaSK/tlstesttool/src/tls/mbedtls/TlsSession.cpp:18: /usr/include/c++/11/array:176:7: note: by argument 1 of type ‘const std::array<char, 1024>*’ to ‘constexpr std::array<_Tp, _Nm>::size_type std::array<_Tp, _Nm>::size() const [with _Tp = char; long unsigned int _Nm = 1024]’ declared here 176 | size() const noexcept { return _Nm; } | ^~~~ /home/Documents/TaSK/tlstesttool/src/tls/mbedtls/TlsSession.cpp:143:32: note: ‘str’ declared here 143 | std::array<char, 1024> str; | ^~~ cc1plus: all warnings being treated as errors gmake[2]: *** [src/tls/mbedtls/CMakeFiles/TlsTestToolTlsMbedTls.dir/build.make:90: src/tls/mbedtls/CMakeFiles/TlsTestToolTlsMbedTls.dir/TlsSession.cpp.o] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:427: src/tls/mbedtls/CMakeFiles/TlsTestToolTlsMbedTls.dir/all] Error 2 gmake: *** [Makefile:91: all] Error 2
OS: Description: Ubuntu 22.04.1 LTS Release: 22.04 Codename: jammy
Hi, thanks for reporting the issue. For reproducing the issue, could you please provide us with the version of CMAKE and the C++ compiler that is used.