dxx-rebirth/similar/main
Kp 5e52d11fc6 Discourage spurious gcc warning
gcc-12 can issue `-Warray-bounds` warnings for code inlined from system
headers, and warns about `std::sort()` on a small array (
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107986> split from
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104165>).  Per a comment
in a related Fedora report
<https://bugzilla.redhat.com/show_bug.cgi?id=2051783#c3>, and local
testing, adding an explicit unreachable on the impossible case that the
end iterator exceeds the end of the array will discourage gcc from
warning without needing to disable -Warray-bounds.

This failure was previously observed in early testing with gcc-12, and
was set aside in the hope that gcc-12 would be fixed before it came into
widespread use.  That has not happened, and JoeNotCharles reported
<2644e0cb93>
this independently.  JoeNotCharles proposed disabling the warning for
the call to `std::sort`.  This commit instead leaves the warning
enabled, but encourages gcc to see that the bad path is impossible,
allowing gcc to delete the bad path before the warning is issued.
2023-01-14 19:05:37 +00:00
..
ai.cpp Use enum class for sound_sample_rate 2023-01-07 22:17:31 +00:00
aipath.cpp Pass robot_info to move_towards_segment_center 2022-12-02 04:09:20 +00:00
automap.cpp Fix various Win32 build failures due to ambiguous operator[]() 2022-10-23 23:00:24 +00:00
bm.cpp Use enum class for properties_init result 2023-01-07 22:17:31 +00:00
bmread.cpp Harden bm_read_alias against bad input 2023-01-07 22:17:31 +00:00
cntrlcen.cpp Pass ranges::subrange to reactor_read_n 2022-12-31 16:21:47 +00:00
collide.cpp Use enum class for bitmap_index 2022-12-31 16:21:47 +00:00
config.cpp Rework convert_integer to return result in some cases 2023-01-14 19:05:37 +00:00
console.cpp Fix OS X clang build 2022-10-31 00:51:32 +00:00
controls.cpp optimize include files (include what you use) 2021-02-06 21:38:50 +01:00
credits.cpp Use std::span for CREDITS_FILE 2022-09-24 17:47:52 +00:00
digiobj.cpp Use enum class for sound_channel 2022-12-17 13:16:28 +00:00
dumpmine.cpp Remove macro wrapper around nm_messagebox 2023-01-14 19:05:37 +00:00
effects.cpp Use sidenum_t in more places 2022-02-19 14:52:17 +00:00
endlevel.cpp Use enum class for polygon_model_index 2022-12-18 18:32:14 +00:00
fireball.cpp Use enum class for polygon_model_index 2022-12-18 18:32:14 +00:00
fuelcen.cpp Inline object_create_explosion into callers 2022-11-07 01:59:34 +00:00
fvi.cpp Use enum class for bitmap_index 2022-12-31 16:21:47 +00:00
game.cpp Use enum class for sound_sample_rate 2023-01-07 22:17:31 +00:00
gamecntl.cpp Fix OS X clang build 2022-10-31 00:51:32 +00:00
gamefont.cpp Move various static functions into anonymous namespace 2022-07-09 13:39:29 +00:00
gamemine.cpp Use enum for segnum_t 2022-07-02 18:10:45 +00:00
gamerend.cpp Use enum class for bitmap_index 2022-12-31 16:21:47 +00:00
gamesave.cpp Remove macro wrapper around nm_messagebox 2023-01-14 19:05:37 +00:00
gameseg.cpp Use enum class for delta_light_index 2022-11-07 01:59:34 +00:00
gameseq.cpp Pass ranges::subrange to glitz_menu 2022-12-31 16:21:47 +00:00
gauges.cpp Use enum class for bitmap_index 2022-12-31 16:21:47 +00:00
generate-kconfig-udlr.py Fix generate-kconfig-udlr.py for Python3 2022-11-13 21:17:23 +00:00
hostage.cpp optimize include files (include what you use) 2021-02-06 21:38:50 +01:00
hud.cpp Fix various Win32 build failures due to ambiguous operator[]() 2022-10-23 23:00:24 +00:00
iff.cpp Inline PHYSFSX_fseek(..., SEEK_SET) 2022-12-18 23:10:39 +00:00
inferno.cpp Simplify SDL_QUIT handling 2023-01-14 19:05:37 +00:00
kconfig.cpp Merge commit 'refs/pull/657/head' into master 2022-08-23 02:13:01 +00:00
kconfig.ui-table.cpp Rename pitch -> pitch_ud for consistency 2022-02-27 14:23:53 +00:00
kmatrix.cpp Use alias template per_player_array for arrays that are MAX_PLAYERS long 2022-09-24 17:47:53 +00:00
laser.cpp Inline object_create_muzzle_flash into callers 2022-11-13 21:17:23 +00:00
lighting.cpp Factor out computing object light from color 2022-12-31 16:21:47 +00:00
menu.cpp Fix off-by-strlen(sep) in buffer capacity check 2023-01-14 19:05:37 +00:00
mglobal.cpp Use std::span for poison helper functions 2022-09-24 17:47:51 +00:00
mission.cpp Remove macro wrapper around nm_messagebox 2023-01-14 19:05:37 +00:00
morph.cpp Switch do_morph_frame to enumerate(zip()) 2023-01-07 22:17:31 +00:00
multi.cpp Add compile-time sanity check on multi_send_data_direct length 2023-01-14 19:05:37 +00:00
multibot.cpp Inline object_create_explosion into callers 2022-11-07 01:59:34 +00:00
net_udp.cpp Remove macro wrapper around nm_messagebox 2023-01-14 19:05:37 +00:00
newdemo.cpp Remove macro wrapper around nm_messagebox 2023-01-14 19:05:37 +00:00
newmenu.cpp Track newmenu return value using std::shared_ptr 2023-01-14 19:05:37 +00:00
object.cpp Use enum class for bitmap_index 2022-12-31 16:21:47 +00:00
paging.cpp Move vclip id validation down into paging_touch_vclip 2023-01-14 19:05:37 +00:00
physics.cpp Pass LevelSharedRobotInfoState to various functions that need it 2022-07-09 13:39:29 +00:00
piggy.cpp Harden D2 loading of D1 texture numbers 2023-01-07 22:17:31 +00:00
player.cpp Use enum class for polygon_model_index 2022-12-18 18:32:14 +00:00
playsave.cpp Rework convert_integer to return result in some cases 2023-01-14 19:05:37 +00:00
polyobj.cpp Use if constexpr to guard calls to align_polygon_model_data 2022-12-31 16:21:47 +00:00
powerup.cpp Detect escort goal even for silent powerups 2023-01-07 22:17:31 +00:00
render.cpp Discourage spurious gcc warning 2023-01-14 19:05:37 +00:00
robot.cpp Return ranges::subrange from robot_get_anim_state 2022-12-31 16:21:47 +00:00
scores.cpp Remove macro wrapper around nm_messagebox 2023-01-14 19:05:37 +00:00
segment.cpp Use enum class for delta_light_index 2022-11-07 01:59:34 +00:00
slew.cpp optimize include files (include what you use) 2021-02-06 21:38:50 +01:00
songs.cpp Fix various Win32 build failures due to ambiguous operator[]() 2022-10-23 23:00:24 +00:00
state.cpp Remove macro wrapper around nm_messagebox 2023-01-14 19:05:37 +00:00
switch.cpp Use enum class for player connected status 2022-07-16 15:26:12 +00:00
terrain.cpp Move various static functions into anonymous namespace 2022-07-09 13:39:29 +00:00
texmerge.cpp Use enum class for bitmap_index 2022-12-31 16:21:47 +00:00
text.cpp Move various static functions into anonymous namespace 2022-07-09 13:39:29 +00:00
titles.cpp Use enum class for bitmap_index 2022-12-31 16:21:47 +00:00
vclip.cpp Pass GameBitmaps to draw_object_blob 2022-06-05 17:44:52 +00:00
vers_id.cpp Fix buffer overread at startup 2022-10-19 01:17:33 +00:00
wall.cpp Make enumerate inherit ranges::subrange directly 2022-12-31 16:21:47 +00:00
weapon.cpp Use enum class for bitmap_index 2022-12-31 16:21:47 +00:00