[Beignet] [PATCH 1/2] fix left shift warning
Lu Guanqun
guanqun.lu at intel.com
Sun Aug 18 23:23:55 PDT 2013
/home/q/beignet.git/utests/compiler_long.cpp: In function ‘void compiler_long()’:
/home/q/beignet.git/utests/compiler_long.cpp:33:32: warning: left shift count >= width of type [enabled by default]
/home/q/beignet.git/utests/compiler_long.cpp:34:32: warning: left shift count >= width of type [enabled by default]
Signed-off-by: Lu Guanqun <guanqun.lu at intel.com>
---
utests/compiler_long.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/utests/compiler_long.cpp b/utests/compiler_long.cpp
index fad2744..d7e1517 100644
--- a/utests/compiler_long.cpp
+++ b/utests/compiler_long.cpp
@@ -30,8 +30,8 @@ void compiler_long(void)
src1[7] = -2L, src2[7] = -1L;
src1[8] = 0, src2[8] = 0x8000000000000000UL;
for (int32_t i = 9; i < (int32_t) n; ++i) {
- src1[i] = ((long)rand() << 32) + rand();
- src2[i] = ((long)rand() << 32) + rand();
+ src1[i] = ((int64_t)rand() << 32) + rand();
+ src2[i] = ((int64_t)rand() << 32) + rand();
}
OCL_MAP_BUFFER(0);
OCL_MAP_BUFFER(1);
--
1.7.9.5
More information about the Beignet
mailing list