https://bugs.kde.org/show_bug.cgi?id=381276
Bug ID: 381276 Summary: okteta fails to link liboktetacore because of memset call in bytearraymodel_p.cpp (?) Product: okteta Version: unspecified Platform: Compiled Sources OS: Linux Status: UNCONFIRMED Severity: grave Priority: NOR Component: general Assignee: kosse...@kde.org Reporter: rjvber...@gmail.com Target Milestone: --- Created attachment 106124 --> https://bugs.kde.org/attachment.cgi?id=106124&action=edit workaround: convince the compiler that fillLength can never be 0 (and if it is, don't register a modification) I'm seeing an error when building okteta 17.04.2 with GCC 7.1 that was reported 5y ago already (311098). Not sure what to make of it, but it blocks my build: ``` [ 0%] Building CXX object core/CMakeFiles/OktetaCore.dir/bytearraymodel_p.cpp.o cd /path/to/kf5-okteta/work/build/core && /usr/bin/c++ -DOktetaCore_EXPORTS -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050200 -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_SIGNALS_SLOTS_KEYWORDS -DQT_NO_URL_CAST_FROM_STRING -DQT_STRICT_ITERATORS -DQT_USE_QSTRINGBUILDER -DTRANSLATION_DOMAIN=\"liboktetacore\" -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/path/to/kf5-okteta/work/build/core -I/path/to/kf5-okteta/work/okteta-17.04.2/core -I/path/to/kf5-okteta/work/build/core/OktetaCore_autogen/include -isystem /opt/local/include/qt5 -isystem /opt/local/include/qt5/QtCore -isystem /opt/local/share/qt5/mkspecs/linux-g++-64 -isystem /opt/local/include/KF5/KI18n -isystem /opt/local/include/KF5 -isystem /opt/local/include/KF5/KCodecs -O3 -ftracer -g -DNDEBUG -m64 -std=c++0x -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Wvla -Wdate-time -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -fPIC -std=gnu++11 -o CMakeFiles/OktetaCore.dir/bytearraymodel_p.cpp.o -c /path/to/kf5-okteta/work/okteta-17.04.2/core/bytearraymodel_p.cpp In file included from /usr/include/string.h:640:0, from /opt/local/include/qt5/QtCore/qarraydata.h:44, from /opt/local/include/qt5/QtCore/qbytearray.h:46, from /opt/local/include/qt5/QtCore/qstring.h:49, from /opt/local/include/qt5/QtCore/qobject.h:47, from /opt/local/include/qt5/QtCore/QObject:1, from /path/to/kf5-okteta/work/okteta-17.04.2/core/abstractbytearraymodel.h:32, from /path/to/kf5-okteta/work/build/core/okteta/abstractbytearraymodel.h:1, from /path/to/kf5-okteta/work/okteta-17.04.2/core/bytearraymodel.h:27, from /path/to/kf5-okteta/work/okteta-17.04.2/core/bytearraymodel_p.h:28, from /path/to/kf5-okteta/work/okteta-17.04.2/core/bytearraymodel_p.cpp:23: In function ‘void* memset(void*, int, size_t)’, inlined from ‘Okteta::Size Okteta::ByteArrayModelPrivate::fill(Okteta::Byte, Okteta::Address, Okteta::Size)’ at /path/to/kf5-okteta/work/okteta-17.04.2/core/bytearraymodel_p.cpp:342:11: /usr/include/x86_64-linux-gnu/bits/string3.h:81:30: warning: call to ‘__warn_memset_zero_len’ declared with attribute warning: memset used with constant zero length parameter; this could be due to transposed parameters __warn_memset_zero_len (); ~~~~~~~~~~~~~~~~~~~~~~~^~ [ 4%] Linking CXX shared library libokteta2core.so cd /path/to/kf5-okteta/work/build/core && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/OktetaCore.dir/link.txt --verbose=1 /usr/bin/c++ -fPIC -O3 -ftracer -g -DNDEBUG -m64 -std=c++0x -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Wvla -Wdate-time -Wl,--no-undefined -Wl,--fatal-warnings -Wl,--enable-new-dtags -Wl,-R,/opt/local/lib -shared -Wl,-soname,libokteta2core.so.2 -o libokteta2core.so.0.9.1 CMakeFiles/OktetaCore.dir/codecs/binarybytecodec.cpp.o CMakeFiles/OktetaCore.dir/codecs/valuecodec.cpp.o CMakeFiles/OktetaCore.dir/codecs/charcodec.cpp.o CMakeFiles/OktetaCore.dir/codecs/decimalbytecodec.cpp.o CMakeFiles/OktetaCore.dir/codecs/usasciicharcodec.cpp.o CMakeFiles/OktetaCore.dir/codecs/ebcdic1047charcodec.cpp.o CMakeFiles/OktetaCore.dir/codecs/jisx0201charcodec.cpp.o CMakeFiles/OktetaCore.dir/codecs/hexadecimalbytecodec.cpp.o CMakeFiles/OktetaCore.dir/codecs/octalbytecodec.cpp.o CMakeFiles/OktetaCore.dir/codecs/textcharcodec.cpp.o CMakeFiles/OktetaCore.dir/piecetable/piecelist.cpp.o CMakeFiles/OktetaCore.dir/piecetable/piecetable.cpp.o CMakeFiles/OktetaCore.dir/piecetable/abstractpiecetablechange.cpp.o CMakeFiles/OktetaCore.dir/piecetable/insertpiecetablechange.cpp.o CMakeFiles/OktetaCore.dir/piecetable/removepiecetablechange.cpp.o CMakeFiles/OktetaCore.dir/piecetable/replacepiecetablechange.cpp.o CMakeFiles/OktetaCore.dir/piecetable/swaprangespiecetablechange.cpp.o CMakeFiles/OktetaCore.dir/piecetable/grouppiecetablechange.cpp.o CMakeFiles/OktetaCore.dir/piecetable/piecetablechangehistory.cpp.o CMakeFiles/OktetaCore.dir/piecetable/revertablepiecetable.cpp.o CMakeFiles/OktetaCore.dir/oktetacore.cpp.o CMakeFiles/OktetaCore.dir/abstractbytearraymodel.cpp.o CMakeFiles/OktetaCore.dir/bytearraymodel_p.cpp.o CMakeFiles/OktetaCore.dir/bytearraymodel.cpp.o CMakeFiles/OktetaCore.dir/fixedsizebytearraymodel.cpp.o CMakeFiles/OktetaCore.dir/filebytearraymodel_p.cpp.o CMakeFiles/OktetaCore.dir/filebytearraymodel.cpp.o CMakeFiles/OktetaCore.dir/piecetablebytearraymodel_p.cpp.o CMakeFiles/OktetaCore.dir/piecetablebytearraymodel.cpp.o CMakeFiles/OktetaCore.dir/wordbytearrayservice.cpp.o CMakeFiles/OktetaCore.dir/bookmarklistconstiteratoradapter.cpp.o CMakeFiles/OktetaCore.dir/bookmarklist.cpp.o CMakeFiles/OktetaCore.dir/addressrangelist.cpp.o CMakeFiles/OktetaCore.dir/OktetaCore_autogen/moc_compilation.cpp.o -Wl,-rpath,/opt/local/lib/x86_64-linux-gnu:/opt/local/lib:/opt/local/libexec/qt5/lib /opt/local/lib/x86_64-linux-gnu/libKF5I18n.so.5.35.0 /opt/local/lib/x86_64-linux-gnu/libKF5Codecs.so.5.35.0 /opt/local/libexec/qt5/lib/libQt5Core.so.5.8.0 CMakeFiles/OktetaCore.dir/bytearraymodel_p.cpp.o: In function `memset': /usr/include/x86_64-linux-gnu/bits/string3.h:81: warning: memset used with constant zero length parameter; this could be due to transposed parameters collect2: error: ld returned 1 exit status make[2]: *** [core/libokteta2core.so.0.9.1] Error 1 make[2]: Leaving directory `/path/to/kf5-okteta/work/build' ``` Whatever the error, the same workaround "fixes" it. -- You are receiving this mail because: You are watching all bug changes.