mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
basic: fix -Wformat-security warnings (#2284)
Fix warnings such as: test_vloadstore.cpp:330:49: error: format string is not a string literal (potentially insecure) There were no security issues here as the format string arguments do not contain any conversion specifiers and are never written to. Make that latter fact explicit to avoid the warnings. Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
committed by
GitHub
parent
d38b8b4ae8
commit
b9301d1ae8
@@ -46,10 +46,10 @@ char load_str[128] = { 0 };
|
|||||||
extern cl_half_rounding_mode halfRoundingMode;
|
extern cl_half_rounding_mode halfRoundingMode;
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const char *store_pattern= "results[ tid ] = tmp;\n";
|
static const char *const store_pattern= "results[ tid ] = tmp;\n";
|
||||||
static const char *store_patternV3 = "results[3*tid] = tmp.s0; results[3*tid+1] = tmp.s1; results[3*tid+2] = tmp.s2;\n";
|
static const char *const store_patternV3 = "results[3*tid] = tmp.s0; results[3*tid+1] = tmp.s1; results[3*tid+2] = tmp.s2;\n";
|
||||||
static const char *load_pattern = "sSharedStorage[ i ] = src[ i ];\n";
|
static const char *const load_pattern = "sSharedStorage[ i ] = src[ i ];\n";
|
||||||
static const char *load_patternV3 = "sSharedStorage[3*i] = src[ 3*i]; sSharedStorage[3*i+1] = src[3*i+1]; sSharedStorage[3*i+2] = src[3*i+2];\n";
|
static const char *const load_patternV3 = "sSharedStorage[3*i] = src[ 3*i]; sSharedStorage[3*i+1] = src[3*i+1]; sSharedStorage[3*i+2] = src[3*i+2];\n";
|
||||||
static const char *kernel_pattern[] = {
|
static const char *kernel_pattern[] = {
|
||||||
pragma_str,
|
pragma_str,
|
||||||
"#define STYPE %s\n"
|
"#define STYPE %s\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user