From 3093eddcf8cde92cd1cb46a6bc00140c0f4c466b Mon Sep 17 00:00:00 2001 From: Konstantin Zhuravlyov Date: Tue, 9 Aug 2022 13:23:55 -0400 Subject: [PATCH] SWDEV-350564 - Silence int-conversion warnings as errors Change-Id: Ib49471b90ee8f10f24ca0b56ee9fc1d0d78c30c6 [ROCm/clr commit: 5407e181934c67ceb410dbfcec6ef78b33f41e35] --- .../module/runtime/OCLGenericAddressSpace.cpp | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/projects/clr/opencl/tests/ocltst/module/runtime/OCLGenericAddressSpace.cpp b/projects/clr/opencl/tests/ocltst/module/runtime/OCLGenericAddressSpace.cpp index e28ecb41c4..dd68824ea7 100644 --- a/projects/clr/opencl/tests/ocltst/module/runtime/OCLGenericAddressSpace.cpp +++ b/projects/clr/opencl/tests/ocltst/module/runtime/OCLGenericAddressSpace.cpp @@ -110,9 +110,9 @@ void OCLGenericAddressSpace::test6(void) { } \n\ results[0] = *ptr;\n\ results[1] = pint;\n\ - results[2] = ptr;\n\ - results[3] = to_private(ptr);\n\ - results[4] = &pint;\n\ + results[2] = (ulong)ptr;\n\ + results[3] = (ulong)to_private(ptr);\n\ + results[4] = (ulong)&pint;\n\ } \n"; const size_t global_work_size = 1; const size_t arrSize = global_work_size * 5; @@ -185,16 +185,16 @@ void OCLGenericAddressSpace::test5(void) { if ((tid % 2) == 0) { \n\ results[tid*5] = *ptr;\n\ results[tid*5+1] = lint;\n\ - results[tid*5+2] = ptr;\n\ - results[tid*5+3] = to_local(ptr);\n\ - results[tid*5+4] = &lint;\n\ + results[tid*5+2] = (ulong)ptr;\n\ + results[tid*5+3] = (ulong)to_local(ptr);\n\ + results[tid*5+4] = (ulong)&lint;\n\ } \n\ else { \n\ results[tid*5] = *ptr;\n\ results[tid*5+1] = gint;\n\ - results[tid*5+2] = ptr;\n\ - results[tid*5+3] = to_global(ptr);\n\ - results[tid*5+4] = &gint;\n\ + results[tid*5+2] = (ulong)ptr;\n\ + results[tid*5+3] = (ulong)to_global(ptr);\n\ + results[tid*5+4] = (ulong)&gint;\n\ } \n\ } \n"; const size_t global_work_size = 2; @@ -290,16 +290,16 @@ void OCLGenericAddressSpace::test4(void) { if ((tid % 2) == 0) { \n\ results[tid*5] = *ptr;\n\ results[tid*5+1] = pint;\n\ - results[tid*5+2] = ptr;\n\ - results[tid*5+3] = to_private(ptr);\n\ - results[tid*5+4] = &pint;\n\ + results[tid*5+2] = (ulong)ptr;\n\ + results[tid*5+3] = (ulong)to_private(ptr);\n\ + results[tid*5+4] = (ulong)&pint;\n\ } \n\ else { \n\ results[tid*5] = *ptr;\n\ results[tid*5+1] = gint;\n\ - results[tid*5+2] = ptr;\n\ - results[tid*5+3] = to_global(ptr);\n\ - results[tid*5+4] = &gint;\n\ + results[tid*5+2] = (ulong)ptr;\n\ + results[tid*5+3] = (ulong)to_global(ptr);\n\ + results[tid*5+4] = (ulong)&gint;\n\ } \n\ } \n"; const size_t global_work_size = 2;