From 5b3bfeeca849db763657849e648f4b9a8a3c7dc3 Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Tue, 22 Oct 2024 19:00:38 +0200 Subject: [PATCH] [NFC] relationals: fix -Wformat-security warnings (#2084) Fix a "format string is not a string literal (potentially insecure)" warning. There is no security issue here as the format string argument is constructed using a stringstream right before. Fix this occurrence anyway to allow enabling the warning globally. Signed-off-by: Sven van Haastregt --- test_conformance/relationals/test_comparisons_fp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_conformance/relationals/test_comparisons_fp.cpp b/test_conformance/relationals/test_comparisons_fp.cpp index 73ff3dd9..6c4890d7 100644 --- a/test_conformance/relationals/test_comparisons_fp.cpp +++ b/test_conformance/relationals/test_comparisons_fp.cpp @@ -309,7 +309,7 @@ int RelationalsFPTest::test_equiv_kernel(unsigned int vecSize, sstr << "ERROR: Data sample " << i << ":" << j << " at size " << vs << " does not validate! Expected " << e << ", got " << o << ", source " << iA << ":" << iB << std::endl; - log_error(sstr.str().c_str()); + log_error("%s", sstr.str().c_str()); }; /* And verify! */