diff --git a/test/util-test.cc b/test/util-test.cc index 017ac9d8..d7d6d73a 100644 --- a/test/util-test.cc +++ b/test/util-test.cc @@ -700,7 +700,7 @@ void test_count_digits() { TEST(UtilTest, StringRef) { char space[100]; - snprintf(space, sizeof(space), "some string"); + std::strcpy(space, "some string"); EXPECT_EQ(sizeof("some string") - 1, StringRef(space).size()); }