Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile warnings on linux with gcc11 #646

Open
planetmaker opened this issue Sep 18, 2021 · 1 comment
Open

Compile warnings on linux with gcc11 #646

planetmaker opened this issue Sep 18, 2021 · 1 comment

Comments

@planetmaker
Copy link

planetmaker commented Sep 18, 2021

There are several compile warnings issued during compilation (gcc 11.2.1, Fedora 34):
commit 60cabbe (HEAD -> core4, origin/core4, origin/HEAD)

======================================================================================
/home/planetmaker/ryzom/dev/ryzomcore/nel/3rdparty/seven_zip/Bcj2Enc.c: In function 'Bcj2Enc_Encode':
/home/planetmaker/ryzom/dev/ryzomcore/nel/3rdparty/seven_zip/Bcj2Enc.c:307:18: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
307 | p->temp[i] = src[i];
| ~~~~~~~~~~~^~~~~~~~
In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/3rdparty/seven_zip/Bcj2Enc.c:17:
/home/planetmaker/ryzom/dev/ryzomcore/nel/3rdparty/seven_zip/Bcj2.h:124:8: note: at offset 8 into destination object 'temp' of size 8
124 | Byte temp[4 * 2];
| ^~~~

======================================================================================
In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/include/nel/misc/smart_ptr.h:919,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/include/nel/misc/cdb.h:28,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/include/nel/misc/cdb_branch.h:26,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/include/nel/misc/cdb_branch_observing_handler.h:23,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/src/misc/cdb_branch_observing_handler.cpp:21:
In member function 'void NLMISC::CRefPtr::unRef() const [with T = NLMISC::ICDBNode::IPropertyObserver]',
inlined from 'NLMISC::CRefPtr::~CRefPtr() [with T = NLMISC::ICDBNode::IPropertyObserver]' at /home/planetmaker/ryzom/dev/ryzomcore/nel/include/nel/misc/smart_ptr_inline.h:189:7,
inlined from 'NLMISC::CCDBBranchObservingHandler::CCDBDBBranchObserverHandle::~CCDBDBBranchObserverHandle()' at /home/planetmaker/ryzom/dev/ryzomcore/nel/src/misc/cdb_branch_observing_handler.cpp:150:2:
/home/planetmaker/ryzom/dev/ryzomcore/nel/include/nel/misc/smart_ptr_inline.h:140:25: warning: 'void operator delete(void*)' called on unallocated object 'NLMISC::CRefCount::NullPtrInfo' [-Wfree-nonheap-object]
140 | delete pinfo;
| ^~~~~~~~~~~~
In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/include/nel/misc/cdb.h:28,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/include/nel/misc/cdb_branch.h:26,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/include/nel/misc/cdb_branch_observing_handler.h:23,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/src/misc/cdb_branch_observing_handler.cpp:21:
/home/planetmaker/ryzom/dev/ryzomcore/nel/include/nel/misc/smart_ptr.h: In destructor 'NLMISC::CCDBBranchObservingHandler::CCDBDBBranchObserverHandle::~CCDBDBBranchObserverHandle()':
/home/planetmaker/ryzom/dev/ryzomcore/nel/include/nel/misc/smart_ptr.h:69:33: note: declared here
69 | static CPtrInfoBase NullPtrInfo;
| ^~~~~~~~~~~

======================================================================================
/home/planetmaker/ryzom/dev/ryzomcore/nel/src/net/module_gateway.cpp: In member function 'virtual void NLNET::CStandardGateway::sendSecurityCommand(const NLNET::TParsedCommandLine&)':
/home/planetmaker/ryzom/dev/ryzomcore/nel/src/net/module_gateway.cpp:698:51: warning: 'this' pointer is null [-Wnonnull]
698 | _SecurityPlugin->onCommand(command);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/home/planetmaker/ryzom/dev/ryzomcore/nel/src/net/module_gateway.cpp: In member function 'virtual void NLNET::CStandardGateway::_ZThn312_N5NLNET16CStandardGateway19sendSecurityCommandERKNS_18TParsedCommandLineE(const NLNET::TParsedCommandLine&)':
/home/planetmaker/ryzom/dev/ryzomcore/nel/src/net/module_gateway.cpp:698:51: warning: 'this' pointer is null [-Wnonnull]
698 | _SecurityPlugin->onCommand(command);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~

======================================================================================
home/planetmaker/ryzom/dev/ryzomcore/ryzom/common/src/game_share/crypt.cpp: In function 'void rz_init_des()':
/home/planetmaker/ryzom/dev/ryzomcore/ryzom/common/src/game_share/crypt.cpp:861:27: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
861 | perm[k-1] = i+1;
| ~~~~~~~~~~^~~~~
/home/planetmaker/ryzom/dev/ryzomcore/ryzom/common/src/game_share/crypt.cpp:772:30: note: at offset -1 into destination object 'perm' of size 64
772 | static unsigned char perm[64], tmp32[32]; /* "static" for speed */
| ^~~~

======================================================================================
Use std::unique_ptr instead of std::auto_ptr:

In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:30:
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_misc.h: In constructor 'CUTMisc::CUTMisc()':
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_misc.h:41:26: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
41 | add(std::auto_ptrTest::Suite(new CUTMiscCoTask));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~
In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:30:
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_misc.h:42:26: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
42 | add(std::auto_ptrTest::Suite(new CUTMiscCommand));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~
In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:30:
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_misc.h:43:26: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
43 | add(std::auto_ptrTest::Suite(new CUTMiscCommon));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~
In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:30:
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_misc.h:44:26: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
44 | add(std::auto_ptrTest::Suite(new CUTMiscConfigFile));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~
In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:30:
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_misc.h:45:26: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
45 | add(std::auto_ptrTest::Suite(new CUTMiscDebug));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~
In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:30:
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_misc.h:46:26: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
46 | add(std::auto_ptrTest::Suite(new CUTMiscDynLibLoad));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~
In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:30:
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_misc.h:47:26: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
47 | add(std::auto_ptrTest::Suite(new CUTMiscFile));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~
In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:30:
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_misc.h:48:26: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
48 | add(std::auto_ptrTest::Suite(new CUTMiscPackFile));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~
In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:30:
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_misc.h:49:26: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
49 | add(std::auto_ptrTest::Suite(new CUTMiscSingleton));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~
In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:30:
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_misc.h:50:26: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
50 | add(std::auto_ptrTest::Suite(new CUTMiscSString));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~
In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:30:
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_misc.h:51:26: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
51 | add(std::auto_ptrTest::Suite(new CUTMiscStream));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~
In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:30:
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_misc.h:52:26: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
52 | add(std::auto_ptrTest::Suite(new CUTMiscVariable));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~
In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:30:
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_misc.h:53:26: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
53 | add(std::auto_ptrTest::Suite(new CUTMiscTypes));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~
In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:30:
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_misc.h:54:26: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
54 | add(std::auto_ptrTest::Suite(new CUTMiscStringCommon));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~
In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:30:
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_misc.h:55:26: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
55 | add(std::auto_ptrTest::Suite(new CUTMiscBase64));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~
In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:31:
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_net.h: In constructor 'CUTNet::CUTNet()':
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_net.h:31:26: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
31 | add(std::auto_ptrTest::Suite(new CUTNetLayer3));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~
In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:31:
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_net.h:32:26: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
32 | add(std::auto_ptrTest::Suite(new CUTNetMessage));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~
In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:31:
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_net.h:33:26: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
33 | add(std::auto_ptrTest::Suite(new CUTNetModule));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~
In file included from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:32:
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_ligo.h: In constructor 'CUTLigo::CUTLigo()':
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/ut_ligo.h:29:26: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
29 | add(std::auto_ptrTest::Suite(new CUTLigoPrimitive));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp: In function 'int main(int, char**)':
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:137:29: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
137 | ts.add(std::auto_ptrTest::Suite(new CUTMisc));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:138:29: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
138 | ts.add(std::auto_ptrTest::Suite(new CUTNet));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~
/home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:139:29: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
139 | ts.add(std::auto_ptrTest::Suite(new CUTLigo));
| ^~~~~~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/cpptest-suite.h:33,
from /usr/include/cpptest.h:34,
from /home/planetmaker/ryzom/dev/ryzomcore/nel/tools/nel_unit_test/nel_unit_test.cpp:20:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~~~~~

======================================================================================
/home/planetmaker/ryzom/dev/ryzomcore/ryzom/client/src/interface_v3/chat_filter.cpp: In member function 'void CChatTargetFilter::setTargetPlayer(const string&)':
/home/planetmaker/ryzom/dev/ryzomcore/ryzom/client/src/interface_v3/chat_filter.cpp:343:49: warning: 'this' pointer is null [-Wnonnull]
343 | _TargetPartyChat->removeObserver(this);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from /home/planetmaker/ryzom/dev/ryzomcore/ryzom/client/src/interface_v3/chat_filter.h:25,
from /home/planetmaker/ryzom/dev/ryzomcore/ryzom/client/src/interface_v3/chat_filter.cpp:25:
/home/planetmaker/ryzom/dev/ryzomcore/ryzom/client/src/interface_v3/chat_window.h:143:14: note: in a call to non-static member function 'void CChatWindow::removeObserver(CChatWindow::IObserver*)'
143 | void removeObserver(IObserver *obs);
| ^~~~~~~~~~~~~~

======================================================================================
/home/planetmaker/ryzom/dev/ryzomcore/ryzom/common/src/game_share/mirror_prop_value.cpp: In member function 'CMirrorPropValueItem<NLMISC::CEntityId, CPropLocationUnpacked> CMirrorPropValueList<NLMISC::CEntityId, CPropLocationUnpacked>::front()':
/home/planetmaker/ryzom/dev/ryzomcore/ryzom/common/src/game_share/mirror_prop_value.cpp:120:85: warning: taking address of packed member of 'CMirrorPropValueList<NLMISC::CEntityId, CPropLocationUnpacked>::TSharedListCell' may result in an unaligned pointer value [-Waddress-of-packed-member]
120 | return CMirrorPropValueItemNLMISC::CEntityId,CPropLocationUnpacked( this, &(_Container[*_PtFront].Value) );
|

@planetmaker planetmaker changed the title Compile warnings on linux with gcc10 Compile warnings on linux with gcc11 Sep 18, 2021
@kaetemi
Copy link
Member

kaetemi commented Apr 22, 2022

Remaining warnings:

  • Bcj2Enc_Encode, Bcj2Enc
  • static CPtrInfoBase NullPtrInfo, delete pinfo
  • void rz_init_des(), perm
  • CPropLocationUnpacked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants