From e1e94f8c81c4142b8ba53ad4cd054457be342d5d Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Sat, 7 May 2022 09:46:21 +0800 Subject: [PATCH] microsoft/clc: Fixes narrowing error in clc_compiler_test.cpp with mingw/gcc errors: ../../src/microsoft/clc/clc_compiler_test.cpp:563:19: error: narrowing conversion of '268435457' from 'int' to 'uint16_t' {aka 'short unsigned int'} [-Wnarrowing] 563 | 0x00000000, 0x10000001, 0x20000020, 0x30000300, | ^~~~~~~~~~ ../../src/microsoft/clc/clc_compiler_test.cpp:563:31: error: narrowing conversion of '536870944' from 'int' to 'uint16_t' {aka 'short unsigned int'} [-Wnarrowing] 563 | 0x00000000, 0x10000001, 0x20000020, 0x30000300, | ^~~~~~~~~~ ../../src/microsoft/clc/clc_compiler_test.cpp:563:43: error: narrowing conversion of '805307136' from 'int' to 'uint16_t' {aka 'short unsigned int'} [-Wnarrowing] 563 | 0x00000000, 0x10000001, 0x20000020, 0x30000300, Signed-off-by: Yonggang Luo Reviewed-by: Jesse Natalie Acked-by: Daniel Stone Part-of: --- src/microsoft/clc/clc_compiler_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/microsoft/clc/clc_compiler_test.cpp b/src/microsoft/clc/clc_compiler_test.cpp index f84565f4b6f..4a02e39cf7c 100644 --- a/src/microsoft/clc/clc_compiler_test.cpp +++ b/src/microsoft/clc/clc_compiler_test.cpp @@ -559,7 +559,7 @@ TEST_F(ComputeTest, DISABLED_complex_types_local_array_long) inout[idx] = tmp[idx];\n\ }\n"; auto inout = ShaderArg({ 0, 0, 0, 0 }, SHADER_ARG_INOUT); - const uint16_t expected[] = { + const uint64_t expected[] = { 0x00000000, 0x10000001, 0x20000020, 0x30000300, }; run_shader(kernel_source, inout.size(), 1, 1, inout);