1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-29 09:45:34 +00:00
openmw/components
elsid 2bbed8cc06
Fix gcc warning: array subscript 5 is outside array bounds of ‘const char [5]’
In function ‘bool ESM::operator==(const FixedString<capacity>&, const T* const&) [with long unsigned int capacity = 5; T = char; <template-parameter-1-3> = void]’,
    inlined from ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = ESM::FixedString<5>; T2 = const char*]’ at /home/elsid/dev/googletest/build/gcc/release/install/include/gtest/gtest.h:1358:11,
    inlined from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = ESM::FixedString<5>; T2 = const char*; typename std::enable_if<((! std::is_integral<_Tp>::value) || (! std::is_pointer<_Dp>::value))>::type* <anonymous> = 0]’ at /home/elsid/dev/googletest/build/gcc/release/install/include/gtest/gtest.h:1377:64,
    inlined from ‘virtual void {anonymous}::EsmFixedString_equality_operator_for_not_convertible_to_uint32_with_const_char_pointer_Test::TestBody()’ at apps/openmw_test_suite/esm/test_fixed_string.cpp:165:9:
components/esm/esmcommon.hpp:134:19: warning: array subscript 5 is outside array bounds of ‘const char [5]’ [-Warray-bounds]
  134 |         return rhs[capacity] == '\0';
      |                ~~~^
apps/openmw_test_suite/esm/test_fixed_string.cpp: In member function ‘virtual void {anonymous}::EsmFixedString_equality_operator_for_not_convertible_to_uint32_with_const_char_pointer_Test::TestBody()’:
apps/openmw_test_suite/esm/test_fixed_string.cpp:164:20: note: at offset 5 into object ‘other’ of size 5
  164 |         const char other[5] = { 'a', 'b', 'c', 'd', '\0' };
      |                    ^~~~~
2023-01-06 22:09:07 +01:00
..
bsa First pass with include-what-you-use 2022-10-09 10:39:43 +00:00
bullethelpers Remove unused includes 2022-10-09 16:44:18 +02:00
compiler Merge branch 'boat_closer_to_todd' into 'master' 2022-12-28 11:21:24 +00:00
config Remove unused includes 2022-10-09 16:44:18 +02:00
contentselector Apply clang-format to code base 2022-09-22 21:35:26 +03:00
crashcatcher Apply clang-format to code base 2022-09-22 21:35:26 +03:00
debug Revert "Merge branch 'fix_macos_build' into 'master'" 2022-10-12 22:48:34 +01:00
detournavigator Reorganize l10n files 2023-01-02 13:21:05 +01:00
esm Fix gcc warning: array subscript 5 is outside array bounds of ‘const char [5]’ 2023-01-06 22:09:07 +01:00
esm3 Remove redundant ESM::RefId member functions 2022-12-30 00:32:47 +01:00
esm3terrain Apply clang-format to code base 2022-09-22 21:35:26 +03:00
esm4 Move fourCC to a separate file 2022-11-06 15:35:16 +01:00
esmloader CellName is now a RefId, makes more sense that way. 2022-12-27 19:16:21 +01:00
fallback Apply clang-format to code base 2022-09-22 21:35:26 +03:00
files Make sure that local path has a trailing slash on Linux and Windows 2022-12-03 11:27:42 +04:00
fontloader Remove unused includes 2022-10-09 16:44:18 +02:00
fx fix line numbers being off by one for each jump block 2022-10-24 08:40:33 -07:00
interpreter Fixes issue in MW script compilation that would silently produce the wrong bytecode 2022-12-27 19:15:57 +01:00
l10n Separate l10n manager from lua 2022-10-07 17:19:04 +02:00
loadinglistener Apply clang-format to code base 2022-09-22 21:35:26 +03:00
lua Allow passing initData to the :addSript call (#7091) 2022-12-31 22:08:17 +01:00
lua_ui Remove unused includes 2022-10-09 16:44:18 +02:00
misc Remove redundant ESM::RefId member functions 2022-12-30 00:32:47 +01:00
myguiplatform Use OpenMW logging levels for MyGUI log (feature 7130) 2023-01-06 16:01:30 +04:00
navmeshtool Apply clang-format to code base 2022-09-22 21:35:26 +03:00
nif First pass with include-what-you-use 2022-10-09 10:39:43 +00:00
nifbullet Remove unused includes 2022-10-09 16:44:18 +02:00
nifosg Remove unused includes 2022-10-09 16:44:18 +02:00
platform Apply clang-format to code base 2022-09-22 21:35:26 +03:00
process Apply clang-format to code base 2022-09-22 21:35:26 +03:00
resource Clang-format 2023-01-05 01:40:36 +02:00
sceneutil Log screenshot capture 2022-11-22 19:26:28 +00:00
sdlutil Apply clang-format to code base 2022-09-22 21:35:26 +03:00
serialization Apply clang-format to code base 2022-09-22 21:35:26 +03:00
settings First pass with include-what-you-use 2022-10-09 10:39:43 +00:00
shader Add a setting to control coverage adjustment 2022-12-09 00:22:08 +00:00
sqlite3 Apply clang-format to code base 2022-09-22 21:35:26 +03:00
std140 Apply clang-format to code base 2022-09-22 21:35:26 +03:00
stereo Restore false-positive unused includes 2022-10-13 00:49:24 +01:00
terrain Remove unused includes 2022-10-09 16:44:18 +02:00
to_utf8 First pass with include-what-you-use 2022-10-09 10:39:43 +00:00
translation Apply clang-format to code base 2022-09-22 21:35:26 +03:00
version Apply clang-format to code base 2022-09-22 21:35:26 +03:00
vfs First pass with include-what-you-use 2022-10-09 10:39:43 +00:00
widgets Apply clang-format to code base 2022-09-22 21:35:26 +03:00
CMakeLists.txt create a specific esm reader function for RefID to avoid allocation for string and then again for RefId 2022-12-27 19:15:57 +01:00
doc.hpp
windows.hpp Fix build on Windows 2022-04-25 00:25:46 +02:00