1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-31 02:36:41 +00:00
openmw/apps/openmw_test_suite
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
..
detournavigator Use ESM::RefId for worldspace in detournavigator 2022-12-29 23:49:49 +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 Apply clang-format to code base 2022-09-22 21:35:26 +03:00
esm4 Rename components/esm4/acti.hpp -> components/esm4/loadacti.hpp 2022-04-23 00:40:45 +02:00
esmloader 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
files Remove unused includes 2022-10-09 16:44:18 +02:00
fx Apply clang-format to code base 2022-09-22 21:35:26 +03:00
lua 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
misc Apply clang-format to code base 2022-09-22 21:35:26 +03:00
mwdialogue Apply clang-format to code base 2022-09-22 21:35:26 +03:00
mwscript Merge branch 'boat_closer_to_todd' into 'master' 2022-12-28 11:21:24 +00:00
mwworld Merge branch 'fix_hour_modulo' into 'master' 2022-12-28 10:33:20 +00:00
nif Do not add redundant nullptr parent 2022-09-24 19:10:31 +02:00
nifloader Move init functions for Nif nodes to a separate file 2022-09-24 19:10:25 +02:00
nifosg Add tests for NifOsg::Loader 2022-09-24 19:10:39 +02:00
openmw 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 Apply clang-format to code base 2022-09-22 21:35:26 +03:00
shader Apply clang-format to code base 2022-09-22 21:35:26 +03:00
sqlite3 Apply clang-format to code base 2022-09-22 21:35:26 +03:00
toutf8 Apply clang-format to code base 2022-09-22 21:35:26 +03:00
CMakeLists.txt Fix hour modulo expression 2022-12-28 00:04:04 +01:00
openmw_test_suite.cpp Apply clang-format to code base 2022-09-22 21:35:26 +03:00
testing_util.hpp Apply clang-format to code base 2022-09-22 21:35:26 +03:00