diff --git a/internal/ceres/fixed_array_test.cc b/internal/ceres/fixed_array_test.cc index d6c56052a..66b3fbfa2 100644 --- a/internal/ceres/fixed_array_test.cc +++ b/internal/ceres/fixed_array_test.cc @@ -466,7 +466,7 @@ TEST(FixedArrayTest, ManySizedArraysOfArraysOf2) { // will always overflow destination buffer [-Werror] TEST(FixedArrayTest, AvoidParanoidDiagnostics) { ceres::internal::FixedArray buf(32); - sprintf(buf.data(), "foo"); // NOLINT(runtime/printf) + snprintf(buf.data(), 32, "foo"); } TEST(FixedArrayTest, TooBigInlinedSpace) {