Large amount of compiler warnings on Gentoo
Compiling current next branch, here is the output:
make[1]: Entering directory '/home/katsy/SRB2/src'
Detected Linux 64-bit (LINUX64)...
Using built-in specs.
COLLECT_GCC=cc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/13/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-13.2.1_p20230826/work/gcc-13-20230826/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/13 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/13/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/13 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/13/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/13/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13 --disable-silent-rules --disable-dependency-tracking --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/13/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --disable-libunwind-exceptions --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 13.2.1_p20230826 p7' --with-gcc-major-version-only --enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libssp --disable-libada --disable-cet --disable-systemtap --disable-valgrind-annotations --disable-vtable-verify --disable-libvtv --without-zstd --without-isl --enable-default-pie --enable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.2.1 20230826 (Gentoo 13.2.1_p20230826 p7)
SHELL ..... /bin/sh
CC ........ cc
CFLAGS .... -DCOMPVERSION -g -DUNIXCOMMON -DLUA_USE_POSIX -I/usr/X11R6/include -DDIRECTFULLSCREEN -DHAVE_SDL -DHAVE_MIXER -DHAVE_THREADS -I/usr/include/SDL2 -D_REENTRANT -DHWRENDER -I/usr/include/libpng16 -D_LARGEFILE64_SOURCE -DHAVE_PNG -DHAVE_CURL -DHAVE_GME -DHAVE_OPENMPT -DHAVE_ZLIB -O3 -DNDEBUG -Wall -Wno-trigraphs -W -Wno-div-by-zero -Wfloat-equal -Wundef -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wsign-compare -Waggregate-return -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wnested-externs -Winline -Wdisabled-optimization -Wformat-y2k -Wformat-security
LDFLAGS ... -lm -rdynamic -L/usr/X11R6/lib -lrt -lSDL2_mixer -L/usr/lib64 -lSDL2 -L/usr/lib64 -lpng16 -lcurl -lgme -lopenmpt -lz
Checking dependency files...
-- sdl/i_net.c ...
-- sdl/i_system.c ...
-- sdl/i_main.c ...
-- sdl/i_video.c ...
-- sdl/dosstr.c ...
-- sdl/endtxt.c ...
-- sdl/hwsym_sdl.c ...
sdl/i_system.c: In function ‘I_GetJoyName’:
sdl/i_system.c:1688:25: warning: ‘__builtin_strncpy’ specified bound 255 equals destination size [-Wstringop-truncation]
1688 | strncpy(joyname, tempname, 255);
| ^
-- sdl/ogl_sdl.c ...
-- sdl/mixer_sound.c ...
-- sdl/i_threads.c ...
-- hardware/hw_bsp.c ...
-- hardware/hw_draw.c ...
-- hardware/hw_light.c ...
-- hardware/hw_main.c ...
-- hardware/hw_clip.c ...
-- hardware/hw_md2.c ...
-- hardware/hw_cache.c ...
-- hardware/hw_md2load.c ...
-- hardware/hw_md3load.c ...
-- hardware/hw_model.c ...
-- hardware/hw_batching.c ...
-- hardware/r_opengl/r_opengl.c ...
-- md5.c ...
-- apng.c ...
-- string.c ...
-- d_main.c ...
-- dehacked.c ...
-- deh_soc.c ...
-- deh_lua.c ...
deh_soc.c: In function ‘readgametype’:
deh_soc.c:1235:33: warning: ‘__builtin_strncpy’ specified bound 1024 equals destination size [-Wstringop-truncation]
1235 | strncpy(gtconst, word2, MAXLINELEN);
| ^
deh_soc.c:1331:17: warning: ‘__builtin_strncpy’ specified bound 1024 equals destination size [-Wstringop-truncation]
1331 | strncpy(gtconst, gtname, MAXLINELEN);
| ^
-- deh_tables.c ...
-- z_zone.c ...
deh_soc.c: In function ‘readtextprompt’:
deh_soc.c:2291:41: warning: ‘__builtin_strncpy’ output may be truncated copying 32 bytes from a string of length 33 [-Wstringop-truncation]
2291 | strncpy(textprompts[num]->page[pagenum].name, name, 32);
| ^
-- f_finale.c ...
f_finale.c: In function ‘F_LoadAlacroixGraphics’:
f_finale.c:2573:58: warning: ‘%s’ directive writing up to 109 bytes into a region of size 5 [-Wformat-overflow=]
2573 | sprintf(&lumpnames[j][0], "T%.1hu%s", (UINT16)( (UINT8)newttscale+1 ), names[j]);
| ^~
In file included from /usr/include/stdio.h:906,
from doomdef.h:86,
from f_finale.c:14:
In function ‘sprintf’,
inlined from ‘F_LoadAlacroixGraphics’ at f_finale.c:2573:4:
/usr/include/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output between 3 and 112 bytes into a destination of size 7
30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
-- f_wipe.c ...
deh_soc.c: In function ‘readmaincfg’:
deh_soc.c:3781:33: warning: ‘__builtin_strncpy’ specified bound 9 equals destination size [-Wstringop-truncation]
3781 | strncpy(ttname, word2, 9);
| ^
deh_soc.c:3866:33: warning: ‘__builtin_strncpy’ specified bound depends on the length of the source argument [-Wstringop-truncation]
3866 | strncpy(timeattackfolder, gamedatafilename, min(filenamelen, sizeof (timeattackfolder)));
| ^
deh_soc.c:3865:47: note: length computed here
3865 | filenamelen = strlen(gamedatafilename)-4; // Strip off the extension
| ^~~~~~~~~~~~~~~~~~~~~~~~
-- g_demo.c ...
deh_soc.c: In function ‘readlevelheader’:
deh_soc.c:1664:33: warning: ‘__builtin_strncpy’ specified bound 8 equals destination size [-Wstringop-truncation]
1664 | strncpy(mapheaderinfo[num-1]->interscreen, word2, 8);
| ^
-- g_game.c ...
-- g_input.c ...
g_game.c: In function ‘G_BuildMapName’:
g_game.c:818:39: warning: ‘%.2d’ directive writing between 2 and 11 bytes into a region of size 7 [-Wformat-overflow=]
818 | sprintf(&mapname[3], "%.2d", map);
| ^~~~
In function ‘G_BuildMapName’,
inlined from ‘G_BuildMapName’ at g_game.c:810:13:
g_game.c:818:38: note: directive argument in the range [-2147483648, 99]
818 | sprintf(&mapname[3], "%.2d", map);
| ^~~~~~
In file included from /usr/include/stdio.h:906,
from doomdef.h:86,
from g_game.c:14:
In function ‘sprintf’,
inlined from ‘G_BuildMapName’ at g_game.c:818:3,
inlined from ‘G_BuildMapName’ at g_game.c:810:13:
/usr/include/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output between 3 and 12 bytes into a destination of size 7
30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
-- am_map.c ...
-- command.c ...
-- console.c ...
g_game.c: In function ‘G_FindMapByNameOrCode’:
g_game.c:818:39: warning: ‘%.2d’ directive writing between 2 and 11 bytes into a region of size 7 [-Wformat-overflow=]
818 | sprintf(&mapname[3], "%.2d", map);
| ^~~~
In function ‘G_BuildMapName’,
inlined from ‘G_BuildMapName’ at g_game.c:810:13,
inlined from ‘G_FindMapByNameOrCode’ at g_game.c:5418:7:
g_game.c:818:38: note: directive argument in the range [-2147483648, 99]
818 | sprintf(&mapname[3], "%.2d", map);
| ^~~~~~
In function ‘sprintf’,
inlined from ‘G_BuildMapName’ at g_game.c:818:3,
inlined from ‘G_BuildMapName’ at g_game.c:810:13,
inlined from ‘G_FindMapByNameOrCode’ at g_game.c:5418:7:
/usr/include/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output between 3 and 12 bytes into a destination of size 7
30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
-- hu_stuff.c ...
-- i_time.c ...
-- y_inter.c ...
-- st_stuff.c ...
hu_stuff.c: In function ‘DoSayCommand’:
hu_stuff.c:501:17: warning: ‘__builtin_strncpy’ specified bound 3 equals destination size [-Wstringop-truncation]
501 | strncpy(playernum, msg+3, 3);
| ^
hu_stuff.c: In function ‘Got_Saycmd’:
hu_stuff.c:3033:9: warning: ‘__builtin_strncpy’ specified bound 1024 equals destination size [-Wstringop-truncation]
3033 | strncpy(cechotext, msg, sizeof(cechotext));
| ^
-- m_aatree.c ...
hu_stuff.c: In function ‘HU_Responder’:
hu_stuff.c:968:17: warning: ‘__builtin_strncpy’ specified bound 3 equals destination size [-Wstringop-truncation]
968 | strncpy(playernum, msg+3, 3);
| ^
-- m_anigif.c ...
-- m_argv.c ...
-- m_bbox.c ...
-- m_cheat.c ...
-- m_cond.c ...
hu_stuff.c: In function ‘HU_Drawer’:
hu_stuff.c:1666:33: warning: ‘__builtin_strncpy’ output may be truncated copying 3 bytes from a string of length 220 [-Wstringop-truncation]
1666 | strncpy(playernum, w_chat+3, 3);
| ^
-- m_easing.c ...
hu_stuff.c: In function ‘HU_DoCEcho’:
hu_stuff.c:3033:9: warning: ‘__builtin_strncpy’ specified bound 1024 equals destination size [-Wstringop-truncation]
3033 | strncpy(cechotext, msg, sizeof(cechotext));
| ^
-- m_fixed.c ...
-- m_menu.c ...
-- m_misc.c ...
-- m_perfstats.c ...
-- m_random.c ...
-- m_queue.c ...
-- info.c ...
-- p_ceilng.c ...
-- p_enemy.c ...
-- p_floor.c ...
m_menu.c: In function ‘Nextmap_OnChange’:
m_menu.c:2331:32: warning: ‘/replay/’ directive writing 8 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
2331 | sprintf(tabase,"%s"PATHSEP"replay"PATHSEP"%s"PATHSEP"%s-%s",srb2home, timeattackfolder, G_BuildMapName(cv_nextmap.value), skins[cv_chooseskin.value-1].name);
| ^~~~
In file included from doomdata.h:24,
from doomstat.h:23,
from m_menu.h:18,
from m_menu.c:19:
doomdef.h:641:26: note: format string is defined here
641 | #define PATHSEP "/"
| ^
In file included from /usr/include/stdio.h:906,
from doomdef.h:86:
In function ‘sprintf’,
inlined from ‘Nextmap_OnChange’ at m_menu.c:2331:3:
/usr/include/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output 11 or more bytes (assuming 329) into a destination of size 256
30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
m_menu.c: In function ‘Nextmap_OnChange’:
m_menu.c:2260:32: warning: ‘/replay/’ directive writing 8 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
2260 | sprintf(tabase,"%s"PATHSEP"replay"PATHSEP"%s"PATHSEP"%s-%s",srb2home, timeattackfolder, G_BuildMapName(cv_nextmap.value), skins[cv_chooseskin.value-1].name);
| ^~~~
doomdef.h:641:26: note: format string is defined here
641 | #define PATHSEP "/"
| ^
In function ‘sprintf’,
inlined from ‘Nextmap_OnChange’ at m_menu.c:2260:3:
/usr/include/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output 11 or more bytes (assuming 329) into a destination of size 256
30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
m_menu.c: In function ‘Nextmap_OnChange’:
m_menu.c:2263:35: warning: ‘/replay/’ directive writing 8 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
2263 | sprintf(tabaseold,"%s"PATHSEP"replay"PATHSEP"%s"PATHSEP"%s",srb2home, timeattackfolder, G_BuildMapName(cv_nextmap.value));
| ^~~~
doomdef.h:641:26: note: format string is defined here
641 | #define PATHSEP "/"
| ^
In function ‘sprintf’,
inlined from ‘Nextmap_OnChange’ at m_menu.c:2263:3:
/usr/include/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output 10 or more bytes (assuming 328) into a destination of size 256
30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
-- p_inter.c ...
-- p_lights.c ...
-- p_map.c ...
m_menu.c: In function ‘M_DrawRoomMenu’:
m_menu.c:11174:25: warning: ‘__builtin_strncpy’ output truncated copying between 0 and 3 bytes from a string of length 3 [-Wstringop-truncation]
11174 | strncpy(&text[dot_frame], "...", min(dots, 3 - dot_frame));
| ^
m_menu.c: In function ‘M_SetMenuCurTitlePics’:
m_menu.c:2691:25: warning: ‘__builtin_strncpy’ specified bound 9 equals destination size [-Wstringop-truncation]
2691 | strncpy(curttname, menupres[menutype].ttname, 9);
| ^
m_menu.c: In function ‘M_SetupNextMenu’:
m_menu.c:2691:25: warning: ‘__builtin_strncpy’ specified bound 9 equals destination size [-Wstringop-truncation]
-- p_maputl.c ...
-- p_mobj.c ...
-- p_polyobj.c ...
-- p_saveg.c ...
-- p_setup.c ...
-- p_sight.c ...
-- p_spec.c ...
-- p_telept.c ...
-- p_tick.c ...
-- p_user.c ...
p_spec.c: In function ‘P_ParseAnimationDefintion’:
p_spec.c:354:17: warning: ‘__builtin_strncpy’ specified bound 9 equals destination size [-Wstringop-truncation]
354 | strncpy(animdefs[i].startname, animdefsToken, 9);
| ^
-- p_slopes.c ...
-- tables.c ...
-- r_bsp.c ...
-- r_data.c ...
-- r_draw.c ...
-- r_fps.c ...
-- r_main.c ...
-- r_plane.c ...
-- r_segs.c ...
-- r_skins.c ...
-- r_sky.c ...
-- r_splats.c ...
-- r_things.c ...
-- r_bbox.c ...
-- r_textures.c ...
-- r_patch.c ...
-- r_patchrotation.c ...
-- r_picformats.c ...
-- r_portal.c ...
-- screen.c ...
-- taglist.c ...
-- v_video.c ...
-- s_sound.c ...
v_video.c: In function ‘CV_palette_OnChange’:
v_video.c:393:9: warning: ‘__builtin_strncpy’ output may be truncated copying 8 bytes from a string of length 8 [-Wstringop-truncation]
393 | strncpy(palname, newpal, 8);
| ^
v_video.c:393:9: warning: ‘__builtin_strncpy’ output may be truncated copying 8 bytes from a string of length 8 [-Wstringop-truncation]
s_sound.c: In function ‘S_AddMusicStackEntry’:
s_sound.c:1913:17: warning: ‘__builtin_strncpy’ specified bound 7 equals destination size [-Wstringop-truncation]
1913 | strncpy(music_stacks->musname, (status == JT_MASTER ? mname : (S_CheckQueue() ? queue_name : mapmusname)), 7);
| ^
v_video.c: In function ‘R_GetPalname’:
v_video.c:393:9: warning: ‘__builtin_strncpy’ output may be truncated copying 8 bytes from a string of length 8 [-Wstringop-truncation]
v_video.c: In function ‘GetPalette’:
v_video.c:393:9: warning: ‘__builtin_strncpy’ output may be truncated copying 8 bytes from a string of length 8 [-Wstringop-truncation]
v_video.c: In function ‘V_SetPalette’:
v_video.c:393:9: warning: ‘__builtin_strncpy’ output may be truncated copying 8 bytes from a string of length 8 [-Wstringop-truncation]
s_sound.c: In function ‘S_ChangeMusicEx’:
s_sound.c:2258:9: warning: ‘__builtin_strncpy’ specified bound 7 equals destination size [-Wstringop-truncation]
2258 | strncpy(newmusic, mmusic, 7);
| ^
-- sounds.c ...
-- w_wad.c ...
v_video.c: In function ‘V_Init’:
v_video.c:393:9: warning: ‘__builtin_strncpy’ output may be truncated copying 8 bytes from a string of length 8 [-Wstringop-truncation]
-- filesrch.c ...
-- lzf.c ...
-- b_bot.c ...
-- u_list.c ...
-- snake.c ...
-- lua_script.c ...
-- lua_baselib.c ...
-- lua_mathlib.c ...
-- lua_hooklib.c ...
-- lua_consolelib.c ...
-- lua_infolib.c ...
-- lua_mobjlib.c ...
-- lua_playerlib.c ...
-- lua_skinlib.c ...
-- lua_thinkerlib.c ...
-- lua_maplib.c ...
-- lua_taglib.c ...
-- lua_polyobjlib.c ...
-- lua_blockmaplib.c ...
-- lua_hudlib.c ...
-- lua_hudlib_drawlist.c ...
-- lua_inputlib.c ...
-- blua/lapi.c ...
-- blua/lbaselib.c ...
-- blua/ldo.c ...
-- blua/lfunc.c ...
-- blua/linit.c ...
-- blua/liolib.c ...
-- blua/llex.c ...
-- blua/lmem.c ...
-- blua/lobject.c ...
-- blua/lstate.c ...
-- blua/lstrlib.c ...
-- blua/ltablib.c ...
-- blua/lundump.c ...
-- blua/lzio.c ...
-- blua/lauxlib.c ...
-- blua/lcode.c ...
-- blua/ldebug.c ...
-- blua/ldump.c ...
-- blua/lgc.c ...
-- blua/lopcodes.c ...
-- blua/lparser.c ...
-- blua/lstring.c ...
-- blua/ltable.c ...
-- blua/ltm.c ...
-- blua/lvm.c ...
-- blua/loslib.c ...
-- netcode/d_clisrv.c ...
-- netcode/server_connection.c ...
netcode/server_connection.c: In function ‘PT_AskInfo’:
netcode/server_connection.c:117:9: warning: ‘__builtin_strncpy’ specified bound 24 equals destination size [-Wstringop-truncation]
117 | strncpy(netbuffer->u.serverinfo.gametypename, Gametype_Names[gametype],
| ^
netcode/server_connection.c:122:9: warning: ‘__builtin_strncpy’ specified bound 32 equals destination size [-Wstringop-truncation]
122 | strncpy(netbuffer->u.serverinfo.servername, cv_servername.string,
| ^
netcode/server_connection.c:174:17: warning: ‘__builtin_strncpy’ output may be truncated copying 22 bytes from a string of length 703 [-Wstringop-truncation]
174 | strncpy(netbuffer->u.playerinfo[i].name, (const char *)&player_names[i], MAXPLAYERNAME+1);
| ^
-- netcode/client_connection.c ...
-- netcode/tic_command.c ...
-- netcode/net_command.c ...
netcode/client_connection.c: In function ‘CL_SendJoin’:
netcode/client_connection.c:264:9: warning: ‘__builtin_strncpy’ specified bound 21 equals destination size [-Wstringop-truncation]
264 | strncpy(netbuffer->u.clientcfg.names[0], cv_playername.zstring, MAXPLAYERNAME);
| ^
netcode/client_connection.c: In function ‘CL_ConnectToServer’:
netcode/client_connection.c:974:26: warning: ‘/$$$.sav’ directive writing 8 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
974 | sprintf(tmpsave, "%s" PATHSEP TMPSAVENAME, srb2home);
| ^~~~
In file included from netcode/protocol.h:18,
from netcode/d_clisrv.h:16,
from netcode/client_connection.h:17,
from netcode/client_connection.c:13:
netcode/../doomdef.h:641:26: note: format string is defined here
641 | #define PATHSEP "/"
In file included from /usr/include/stdio.h:906,
from netcode/../doomdef.h:86:
In function ‘sprintf’,
inlined from ‘CL_ConnectToServer’ at netcode/client_connection.c:974:2:
/usr/include/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output between 9 and 264 bytes into a destination of size 256
30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
-- netcode/gamestate.c ...
-- netcode/commands.c ...
netcode/gamestate.c: In function ‘CL_LoadReceivedSavegame’:
netcode/gamestate.c:176:26: warning: ‘/$$$.sav’ directive writing 8 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
176 | sprintf(tmpsave, "%s" PATHSEP TMPSAVENAME, srb2home);
| ^~~~
In file included from netcode/protocol.h:18,
from netcode/d_clisrv.h:16,
from netcode/gamestate.c:13:
netcode/../doomdef.h:641:26: note: format string is defined here
641 | #define PATHSEP "/"
In file included from /usr/include/stdio.h:906,
from netcode/../doomdef.h:86:
In function ‘sprintf’,
inlined from ‘CL_LoadReceivedSavegame’ at netcode/gamestate.c:176:2:
/usr/include/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output between 9 and 264 bytes into a destination of size 256
30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
netcode/gamestate.c: In function ‘PT_WillResendGamestate’:
netcode/gamestate.c:327:26: warning: ‘/$$$.sav’ directive writing 8 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
327 | sprintf(tmpsave, "%s" PATHSEP TMPSAVENAME, srb2home);
| ^~~~
netcode/../doomdef.h:641:26: note: format string is defined here
641 | #define PATHSEP "/"
In function ‘sprintf’,
inlined from ‘PT_WillResendGamestate’ at netcode/gamestate.c:327:2:
/usr/include/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output between 9 and 264 bytes into a destination of size 256
30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
-- netcode/d_net.c ...
-- netcode/d_netcmd.c ...
-- netcode/d_netfil.c ...
-- netcode/http-mserv.c ...
In file included from netcode/d_netcmd.c:15:
netcode/d_netcmd.c: In function ‘Got_RequestAddfoldercmd’:
netcode/../doomdef.h:533:22: warning: ‘%s’ directive writing up to 240 bytes into a region of size 226 [-Wformat-overflow=]
533 | #define M_GetText(x) (x)
| ^~~
netcode/d_netcmd.c:3627:42: note: in expansion of macro ‘M_GetText’
3627 | sprintf(message, M_GetText("Unknown error finding folder (%s)\n"), path);
| ^~~~~~~~~
In file included from /usr/include/stdio.h:906,
from netcode/../doomdef.h:86:
In function ‘sprintf’,
inlined from ‘Got_RequestAddfoldercmd’ at netcode/d_netcmd.c:3627:4:
/usr/include/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output between 33 and 273 bytes into a destination of size 256
30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
netcode/d_netcmd.c: In function ‘Got_RequestAddfoldercmd’:
netcode/../doomdef.h:533:22: warning: ‘%s’ directive writing up to 240 bytes into a region of size 232 [-Wformat-overflow=]
533 | #define M_GetText(x) (x)
| ^~~
netcode/d_netcmd.c:3625:42: note: in expansion of macro ‘M_GetText’
3625 | sprintf(message, M_GetText("The server doesn't have %s\n"), path);
| ^~~~~~~~~
In function ‘sprintf’,
inlined from ‘Got_RequestAddfoldercmd’ at netcode/d_netcmd.c:3625:4:
/usr/include/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output between 26 and 266 bytes into a destination of size 256
30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
netcode/d_netcmd.c: In function ‘Got_RequestAddfoldercmd’:
netcode/../doomdef.h:533:22: warning: ‘%s’ directive writing up to 240 bytes into a region of size 227 [-Wformat-overflow=]
533 | #define M_GetText(x) (x)
| ^~~
netcode/d_netcmd.c:3623:42: note: in expansion of macro ‘M_GetText’
3623 | sprintf(message, M_GetText("Too many files loaded to add %s\n"), path);
| ^~~~~~~~~
In function ‘sprintf’,
inlined from ‘Got_RequestAddfoldercmd’ at netcode/d_netcmd.c:3623:4:
/usr/include/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output between 31 and 271 bytes into a destination of size 256
30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
netcode/d_netcmd.c: In function ‘Got_RequestAddfilecmd’:
netcode/../doomdef.h:533:22: warning: ‘%s’ directive writing up to 240 bytes into a region of size 224 [-Wformat-overflow=]
533 | #define M_GetText(x) (x)
| ^~~
netcode/d_netcmd.c:3571:42: note: in expansion of macro ‘M_GetText’
3571 | sprintf(message, M_GetText("Unknown error finding wad file (%s)\n"), filename);
| ^~~~~~~~~
In function ‘sprintf’,
inlined from ‘Got_RequestAddfilecmd’ at netcode/d_netcmd.c:3571:4:
/usr/include/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output between 35 and 275 bytes into a destination of size 256
30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
netcode/d_netcmd.c: In function ‘Got_RequestAddfilecmd’:
netcode/../doomdef.h:533:22: warning: ‘%s’ directive writing up to 240 bytes into a region of size 235 [-Wformat-overflow=]
533 | #define M_GetText(x) (x)
| ^~~
netcode/d_netcmd.c:3569:42: note: in expansion of macro ‘M_GetText’
3569 | sprintf(message, M_GetText("Checksum mismatch on %s\n"), filename);
| ^~~~~~~~~
In function ‘sprintf’,
inlined from ‘Got_RequestAddfilecmd’ at netcode/d_netcmd.c:3569:4:
/usr/include/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output between 23 and 263 bytes into a destination of size 256
30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
netcode/d_netcmd.c: In function ‘Got_RequestAddfilecmd’:
netcode/../doomdef.h:533:22: warning: ‘%s’ directive writing up to 240 bytes into a region of size 232 [-Wformat-overflow=]
533 | #define M_GetText(x) (x)
| ^~~
netcode/d_netcmd.c:3567:42: note: in expansion of macro ‘M_GetText’
3567 | sprintf(message, M_GetText("The server doesn't have %s\n"), filename);
| ^~~~~~~~~
In function ‘sprintf’,
inlined from ‘Got_RequestAddfilecmd’ at netcode/d_netcmd.c:3567:4:
/usr/include/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output between 26 and 266 bytes into a destination of size 256
30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
netcode/d_netcmd.c: In function ‘Got_RequestAddfilecmd’:
netcode/../doomdef.h:533:22: warning: ‘%s’ directive writing up to 240 bytes into a region of size 227 [-Wformat-overflow=]
533 | #define M_GetText(x) (x)
| ^~~
netcode/d_netcmd.c:3565:42: note: in expansion of macro ‘M_GetText’
3565 | sprintf(message, M_GetText("Too many files loaded to add %s\n"), filename);
| ^~~~~~~~~
In function ‘sprintf’,
inlined from ‘Got_RequestAddfilecmd’ at netcode/d_netcmd.c:3565:4:
/usr/include/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output between 31 and 271 bytes into a destination of size 256
30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
-- netcode/i_tcp.c ...
-- netcode/mserv.c ...
-- comptime.c ...
Linking lsdl2srb2.debug...
=== Build is done, look for lsdl2srb2 at /home/katsy/SRB2/bin ===
make[1]: Leaving directory '/home/katsy/SRB2/src'
cpu info:
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz