From 4207c97c177614519789610735f5719711fb2cca Mon Sep 17 00:00:00 2001 From: kimkulling Date: Fri, 5 Feb 2021 20:01:57 +0100 Subject: [PATCH] Fix compiler warning: warning: argument to ... call is the same expression as the source --- test/unit/utBlenderIntermediate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/utBlenderIntermediate.cpp b/test/unit/utBlenderIntermediate.cpp index b06dc8893..a4d7dc15c 100644 --- a/test/unit/utBlenderIntermediate.cpp +++ b/test/unit/utBlenderIntermediate.cpp @@ -63,8 +63,8 @@ class BlenderIntermediateTest : public ::testing::Test { // The C++ standard defines and expects this behavior: true if lhs < rhs, false otherwise. TEST_F(BlenderIntermediateTest, ConversionData_ObjectCompareTest) { Object obj1, obj2; - strncpy(obj1.id.name, NAME_1, sizeof(NAME_1)); - strncpy(obj2.id.name, NAME_2, sizeof(NAME_2)); + strncpy(obj1.id.name, NAME_1, sizeof(obj1.id.name)); + strncpy(obj2.id.name, NAME_2, sizeof(obj2.id.name)); Blender::ObjectCompare cmp_true_because_first_is_smaller_than_second; bool res(cmp_true_because_first_is_smaller_than_second(&obj1, &obj2));