1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-04-02 05:06:40 +00:00
openmw/components/esm
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
..
attr.cpp Add comma to the last array element to prevent putting multiple elements on a single line 2022-09-12 21:00:51 +02:00
attr.hpp Apply clang-format to code base 2022-09-22 21:35:26 +03:00
common.cpp First pass with include-what-you-use 2022-10-09 10:39:43 +00:00
common.hpp Apply clang-format to code base 2022-09-22 21:35:26 +03:00
defs.hpp Move fourCC to a separate file 2022-11-06 15:35:16 +01:00
esmcommon.hpp Fix gcc warning: array subscript 5 is outside array bounds of ‘const char [5]’ 2023-01-06 22:09:07 +01:00
format.cpp Remove unused includes 2022-10-09 16:44:18 +02:00
format.hpp Move fourCC to a separate file 2022-11-06 15:35:16 +01:00
fourcc.hpp Move fourCC to a separate file 2022-11-06 15:35:16 +01:00
luascripts.cpp Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type 2022-12-27 19:15:54 +01:00
luascripts.hpp 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
records.hpp Apply clang-format to code base 2022-09-22 21:35:26 +03:00
refid.cpp Remove redundant ESM::RefId member functions 2022-12-30 00:32:47 +01:00
refid.hpp Remove redundant ESM::RefId member functions 2022-12-30 00:32:47 +01:00
util.hpp Apply clang-format to code base 2022-09-22 21:35:26 +03:00