1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-19 15:09:43 +00:00
openmw/apps
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
..
benchmarks Apply clang-format to code base 2022-09-22 21:35:26 +03:00
bsatool Apply clang-format to code base 2022-09-22 21:35:26 +03:00
bulletobjecttool Another pass with IWYU 2022-10-10 15:16:18 +02:00
esmtool CellName is now a RefId, makes more sense that way. 2022-12-27 19:16:21 +01:00
essimporter CellName is now a RefId, makes more sense that way. 2022-12-27 19:16:21 +01:00
launcher Move some of player controls logic from C++ to Lua 2022-12-28 22:04:19 +01:00
mwiniimporter Remove unused includes 2022-10-09 16:44:18 +02:00
navmeshtool Use ESM::RefId for worldspace in detournavigator 2022-12-29 23:49:49 +01:00
niftest Another pass with IWYU 2022-10-10 15:16:18 +02:00
opencs Fix dangling reference. 2023-01-02 19:47:12 +01:00
openmw Merge branch 'save_fix' into 'master' 2023-01-06 18:09:00 +00:00
openmw_test_suite Fix gcc warning: array subscript 5 is outside array bounds of ‘const char [5]’ 2023-01-06 22:09:07 +01:00
wizard Another pass with IWYU 2022-10-10 15:16:18 +02:00
doc.hpp