1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-30 15:41:34 +00:00
openmw/apps/components_tests/esm
elsid b5f8a0ecdb
Fix warning: -Wstring-compare
In file included from ../../../components/esm/defs.hpp:7,
                 from ../../../apps/components_tests/esm/test_fixed_string.cpp:1:
In function 'bool ESM::operator==(const FixedString<capacity>&, const char (&)[rhsSize]) [with long unsigned int capacity = 4; long unsigned int rhsSize = 12]',
    inlined from 'virtual void {anonymous}::EsmFixedString_empty_strings_Test::TestBody()' at ../../../apps/components_tests/esm/test_fixed_string.cpp:82:13:
../../../components/esm/esmcommon.hpp:142:85: error: 'int strncmp(const char*, const char*, size_t)' of strings of length 0 and 4 and bound of 4 evaluates to nonzero [-Werror=string-compare]
  142 |         return strnlen(rhs, rhsSize) == strnlen(lhs.mData, capacity) && std::strncmp(lhs.mData, rhs, capacity) == 0;
      |                                                                         ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
2025-04-28 22:07:00 +02:00
..
test_fixed_string.cpp Fix warning: -Wstring-compare 2025-04-28 22:07:00 +02:00
testrefid.cpp Move EXPECT_ERROR macro to a separate header 2024-06-10 23:12:15 +02:00
variant.cpp Split openmw_test_suite into openmw and components tests 2024-06-10 23:12:14 +02:00