alliedmodders / amxmodx

AMX Mod X - Half-Life 1 Scripting and Administration
http://www.amxmodx.org/
499 stars 203 forks source link

Error build with gcc 9.2 #777

Closed Rajikoro closed 5 years ago

Rajikoro commented 5 years ago
[3275] c++ -pipe -fno-strict-aliasing -Wall -Werror -Wno-uninitialized -Wno-unused -Wno-switch -Wno-format -Wno-format-security -m32 -fvisibility=hidden -Wno-narrowing -Wno-unused-result -Wno-error=sign-compare -Wno-parentheses -O2 -march=native -flto -g3 -ggdb3 -Wno-invalid-offsetof -std=c++11 -fvisibility-inlines-hidden -Wno-delete-non-virtual-dtor -fno-exceptions -fno-rtti -DNDEBUG -D_LINUX -DPOSIX -DLINUX -DAMX_NOPROPLIST -DPAWN_CELL_SIZE=32 -DAMXMODX_BUILD -DAMXX_USE_VERSIONLIB -DAMXX_GENERATED_BUILD -I /root/amxmodx/amxmodx/build/includes -I /root/amxmodx/amxmodx/support/versionlib -I /root/amxmodx/amxmodx/public -I /root/amxmodx/amxmodx/public/sdk -I /root/amxmodx/amxmodx/public/amtl -I /root/amxmodx/amxmodx/public/amtl/amtl -I /root/amxmodx/amxmodx/public/memtools -I /root/amxmodx/amxmodx/third_party -I /root/amxmodx/amxmodx/third_party/hashing -I /root/amxmodx/amxmodx/third_party/zlib -I /root/amxmodx/amxmodx/third_party/utf8rewind -I /root/amxmodx/amxmodx/modules/ts/tsx -I /root/amxmodx/amxmodx/modules/ts/tsx/sdk -I /root/amxmodx/metamod-hl1/metamod -I /root/amxmodx/hlsdk/common -I /root/amxmodx/hlsdk/dlls -I /root/amxmodx/hlsdk/engine -I /root/amxmodx/hlsdk/game_shared -I /root/amxmodx/hlsdk/public -I /root/amxmodx/hlsdk/pm_shared -H -c /root/amxmodx/amxmodx/modules/ts/tsx/CMisc.cpp -o CMisc.o
/root/amxmodx/amxmodx/modules/ts/tsx/CMisc.cpp: In member function ‘void CPlayer::restartStats(bool)’:
/root/amxmodx/amxmodx/modules/ts/tsx/CMisc.cpp:85:29: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct Stats’; use assignment or value-initialization instead [-Werror=class-memaccess]
   85 |  memset(&life,0,sizeof(life));
      |                             ^
In file included from /root/amxmodx/amxmodx/modules/ts/tsx/CMisc.h:19,
                 from /root/amxmodx/amxmodx/modules/ts/tsx/CMisc.cpp:15:
/root/amxmodx/amxmodx/modules/ts/tsx/CRank.h:25:8: note: ‘struct Stats’ declared here
   25 | struct Stats {
      |        ^~~~~
cc1plus: all warnings being treated as errors
[3287] c++ -pipe -fno-strict-aliasing -Wall -Werror -Wno-uninitialized -Wno-unused -Wno-switch -Wno-format -Wno-format-security -m32 -fvisibility=hidden -Wno-narrowing -Wno-unused-result -Wno-error=sign-compare -Wno-parentheses -O2 -march=native -flto -g3 -ggdb3 -Wno-invalid-offsetof -std=c++11 -fvisibility-inlines-hidden -Wno-delete-non-virtual-dtor -fno-exceptions -fno-rtti -DNDEBUG -D_LINUX -DPOSIX -DLINUX -DAMX_NOPROPLIST -DPAWN_CELL_SIZE=32 -DAMXMODX_BUILD -DAMXX_USE_VERSIONLIB -DAMXX_GENERATED_BUILD -I /root/amxmodx/amxmodx/build/includes -I /root/amxmodx/amxmodx/support/versionlib -I /root/amxmodx/amxmodx/public -I /root/amxmodx/amxmodx/public/sdk -I /root/amxmodx/amxmodx/public/amtl -I /root/amxmodx/amxmodx/public/amtl/amtl -I /root/amxmodx/amxmodx/public/memtools -I /root/amxmodx/amxmodx/third_party -I /root/amxmodx/amxmodx/third_party/hashing -I /root/amxmodx/amxmodx/third_party/zlib -I /root/amxmodx/amxmodx/third_party/utf8rewind -I /root/amxmodx/amxmodx/modules/tfcx -I /root/amxmodx/amxmodx/modules/tfcx/sdk -I /root/amxmodx/metamod-hl1/metamod -I /root/amxmodx/hlsdk/common -I /root/amxmodx/hlsdk/dlls -I /root/amxmodx/hlsdk/engine -I /root/amxmodx/hlsdk/game_shared -I /root/amxmodx/hlsdk/public -I /root/amxmodx/hlsdk/pm_shared -H -c /root/amxmodx/amxmodx/modules/tfcx/CMisc.cpp -o CMisc.o
/root/amxmodx/amxmodx/modules/tfcx/CMisc.cpp: In member function ‘void CPlayer::restartStats(bool)’:
/root/amxmodx/amxmodx/modules/tfcx/CMisc.cpp:133:29: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct Stats’; use assignment or value-initialization instead [-Werror=class-memaccess]
  133 |  memset(&life,0,sizeof(life));
      |                             ^
In file included from /root/amxmodx/amxmodx/modules/tfcx/CMisc.h:19,
                 from /root/amxmodx/amxmodx/modules/tfcx/CMisc.cpp:16:
/root/amxmodx/amxmodx/modules/tfcx/CRank.h:25:8: note: ‘struct Stats’ declared here
   25 | struct Stats {
      |        ^~~~~
cc1plus: all warnings being treated as errors
[3318] c++ -pipe -fno-strict-aliasing -Wall -Werror -Wno-uninitialized -Wno-unused -Wno-switch -Wno-format -Wno-format-security -m32 -fvisibility=hidden -Wno-narrowing -Wno-unused-result -Wno-error=sign-compare -Wno-parentheses -O2 -march=native -flto -g3 -ggdb3 -Wno-invalid-offsetof -std=c++11 -fvisibility-inlines-hidden -Wno-delete-non-virtual-dtor -fno-exceptions -fno-rtti -DNDEBUG -D_LINUX -DPOSIX -DLINUX -DAMX_NOPROPLIST -DPAWN_CELL_SIZE=32 -DAMXMODX_BUILD -DAMXX_USE_VERSIONLIB -DAMXX_GENERATED_BUILD -DSM_DEFAULT_THREADER -DHAVE_STDINT_H -Dstricmp=strcasecmp -I /root/amxmodx/amxmodx/build/includes -I /root/amxmodx/amxmodx/support/versionlib -I /root/amxmodx/amxmodx/public -I /root/amxmodx/amxmodx/public/sdk -I /root/amxmodx/amxmodx/public/amtl -I /root/amxmodx/amxmodx/public/amtl/amtl -I /root/amxmodx/amxmodx/public/memtools -I /root/amxmodx/amxmodx/third_party -I /root/amxmodx/amxmodx/third_party/hashing -I /root/amxmodx/amxmodx/third_party/zlib -I /root/amxmodx/amxmodx/third_party/utf8rewind -I /root/amxmodx/amxmodx/modules/sqlite -I /root/amxmodx/amxmodx/modules/sqlite/sdk -I /root/amxmodx/metamod-hl1/metamod -I /root/amxmodx/hlsdk/common -I /root/amxmodx/hlsdk/dlls -I /root/amxmodx/hlsdk/engine -I /root/amxmodx/hlsdk/game_shared -I /root/amxmodx/hlsdk/public -I /root/amxmodx/hlsdk/pm_shared -I /root/amxmodx/amxmodx/modules/sqlite/sqlitepp -I /root/amxmodx/amxmodx/modules/sqlite/thread -I /root/amxmodx/amxmodx/third_party/sqlite -H -c /root/amxmodx/amxmodx/modules/sqlite/threading.cpp -o threading.o
/root/amxmodx/amxmodx/modules/sqlite/threading.cpp: In member function ‘virtual void MysqlThread::RunThread(SourceMod::IThreadHandle*)’:
/root/amxmodx/amxmodx/modules/sqlite/threading.cpp:165:39: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct QueuedResultInfo’; use assignment or value-initialization instead [-Werror=class-memaccess]
  165 |  memset(&m_qrInfo, 0, sizeof(m_qrInfo));
      |                                       ^
In file included from /root/amxmodx/amxmodx/modules/sqlite/threading.cpp:16:
/root/amxmodx/amxmodx/modules/sqlite/threading.h:23:8: note: ‘struct QueuedResultInfo’ declared here
   23 | struct QueuedResultInfo
      |        ^~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
Build failed.

ooookk, next

[3959] c++ -pipe -fno-strict-aliasing -Wall -Werror -Wno-uninitialized -Wno-unused -Wno-switch -Wno-format -Wno-format-security -m32 -fvisibility=hidden -Wno-narrowing -Wno-unused-result -Wno-error=sign-compare -Wno-parentheses -O2 -g3 -ggdb3 -Wno-invalid-offsetof -std=c++11 -fvisibility-inlines-hidden -Wno-delete-non-virtual-dtor -fno-exceptions -fno-rtti -DNDEBUG -D_LINUX -DPOSIX -DLINUX -DAMX_NOPROPLIST -DPAWN_CELL_SIZE=32 -DAMXMODX_BUILD -DAMXX_USE_VERSIONLIB -DAMXX_GENERATED_BUILD -DSM_DEFAULT_THREADER -DHAVE_STDINT_H -Dstricmp=strcasecmp -I /root/amxmodx/amxmodx/build/includes -I /root/amxmodx/amxmodx/support/versionlib -I /root/amxmodx/amxmodx/public -I /root/amxmodx/amxmodx/public/sdk -I /root/amxmodx/amxmodx/public/amtl -I /root/amxmodx/amxmodx/public/amtl/amtl -I /root/amxmodx/amxmodx/public/memtools -I /root/amxmodx/amxmodx/third_party -I /root/amxmodx/amxmodx/third_party/hashing -I /root/amxmodx/amxmodx/third_party/zlib -I /root/amxmodx/amxmodx/third_party/utf8rewind -I /root/amxmodx/amxmodx/modules/sqlite -I /root/amxmodx/amxmodx/modules/sqlite/sdk -I /root/amxmodx/metamod-hl1/metamod -I /root/amxmodx/hlsdk/common -I /root/amxmodx/hlsdk/dlls -I /root/amxmodx/hlsdk/engine -I /root/amxmodx/hlsdk/game_shared -I /root/amxmodx/hlsdk/public -I /root/amxmodx/hlsdk/pm_shared -I /root/amxmodx/amxmodx/modules/sqlite/sqlitepp -I /root/amxmodx/amxmodx/modules/sqlite/thread -I /root/amxmodx/amxmodx/third_party/sqlite -H -c /root/amxmodx/amxmodx/modules/sqlite/threading.cpp -o threading.o
/root/amxmodx/amxmodx/modules/sqlite/threading.cpp: In member function ‘virtual void MysqlThread::RunThread(SourceMod::IThreadHandle*)’:
/root/amxmodx/amxmodx/modules/sqlite/threading.cpp:165:39: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct QueuedResultInfo’; use assignment or value-initialization instead [-Werror=class-memaccess]
  165 |  memset(&m_qrInfo, 0, sizeof(m_qrInfo));
      |                                       ^
In file included from /root/amxmodx/amxmodx/modules/sqlite/threading.cpp:16:
/root/amxmodx/amxmodx/modules/sqlite/threading.h:23:8: note: ‘struct QueuedResultInfo’ declared here
   23 | struct QueuedResultInfo
      |        ^~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
[3950] c++ -pipe -fno-strict-aliasing -Wall -Werror -Wno-uninitialized -Wno-unused -Wno-switch -Wno-format -Wno-format-security -m32 -fvisibility=hidden -Wno-narrowing -Wno-unused-result -Wno-error=sign-compare -Wno-parentheses -O2 -g3 -ggdb3 -Wno-invalid-offsetof -std=c++11 -fvisibility-inlines-hidden -Wno-delete-non-virtual-dtor -fno-exceptions -fno-rtti -DNDEBUG -D_LINUX -DPOSIX -DLINUX -DAMX_NOPROPLIST -DPAWN_CELL_SIZE=32 -DAMXMODX_BUILD -DAMXX_USE_VERSIONLIB -DAMXX_GENERATED_BUILD -DHAVE_STDINT_H -I /root/amxmodx/amxmodx/build/includes -I /root/amxmodx/amxmodx/support/versionlib -I /root/amxmodx/amxmodx/public -I /root/amxmodx/amxmodx/public/sdk -I /root/amxmodx/amxmodx/public/amtl -I /root/amxmodx/amxmodx/public/amtl/amtl -I /root/amxmodx/amxmodx/public/memtools -I /root/amxmodx/amxmodx/third_party -I /root/amxmodx/amxmodx/third_party/hashing -I /root/amxmodx/amxmodx/third_party/zlib -I /root/amxmodx/amxmodx/third_party/utf8rewind -I /root/amxmodx/amxmodx/modules/ns -I /root/amxmodx/amxmodx/modules/ns/sdk -I /root/amxmodx/metamod-hl1/metamod -I /root/amxmodx/hlsdk/common -I /root/amxmodx/hlsdk/dlls -I /root/amxmodx/hlsdk/engine -I /root/amxmodx/hlsdk/game_shared -I /root/amxmodx/hlsdk/public -I /root/amxmodx/hlsdk/pm_shared -H -c /root/amxmodx/amxmodx/modules/ns/TitleManager.cpp -o TitleManager.o
In file included from /usr/include/string.h:494,
                 from /root/amxmodx/amxmodx/public/ITextParsers.h:35,
                 from /root/amxmodx/amxmodx/public/IGameConfigs.h:35,
                 from /root/amxmodx/amxmodx/public/sdk/amxxmodule.h:21,
                 from /root/amxmodx/amxmodx/modules/ns/TitleManager.cpp:14:
In function ‘char* strncpy(char*, const char*, size_t)’,
    inlined from ‘void TitleManager::LoadTitles()’ at /root/amxmodx/amxmodx/modules/ns/TitleManager.cpp:96:10:
/usr/include/bits/string_fortified.h:106:34: error: ‘char* __builtin_strncpy(char*, const char*, unsigned int)’ output may be truncated copying 511 bytes from a string of length 2047 [-Werror=stringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘char* strncpy(char*, const char*, size_t)’,
    inlined from ‘void TitleManager::LoadTitles()’ at /root/amxmodx/amxmodx/modules/ns/TitleManager.cpp:146:10:
/usr/include/bits/string_fortified.h:106:34: error: ‘char* __builtin_strncpy(char*, const char*, unsigned int)’ output may be truncated copying 2047 bytes from a string of length 2047 [-Werror=stringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
Build failed.
Rajikoro commented 5 years ago

@Arkshine

Any other information needed?

WPMGPRoSToTeMa commented 5 years ago

Related to #616. Will be fixed by #617.

Rajikoro commented 5 years ago

spasiba, vash soft depmo