Skip to content

Commit

Permalink
[NFC] relationals: fix -Wformat-security warnings
Browse files Browse the repository at this point in the history
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 <sven.vanhaastregt@arm.com>
  • Loading branch information
svenvh committed Sep 13, 2024
1 parent 21b0a09 commit 4a1f8d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test_conformance/relationals/test_comparisons_fp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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! */
Expand Down

0 comments on commit 4a1f8d5

Please sign in to comment.