[Beignet] [PATCH] fix left shift warnings in utests
Zhigang Gong
zhigang.gong at linux.intel.com
Mon Aug 19 00:50:20 PDT 2013
LGTM, pushed, thanks.
On Mon, Aug 19, 2013 at 12:29:17PM +0800, Lu Guanqun wrote:
> We should use the explicit 64 bit types. Otherwise we would have warnings.
>
> Signed-off-by: Lu Guanqun <guanqun.lu at intel.com>
> ---
> utests/compiler_long_2.cpp | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/utests/compiler_long_2.cpp b/utests/compiler_long_2.cpp
> index e3c6640..6c5da4b 100644
> --- a/utests/compiler_long_2.cpp
> +++ b/utests/compiler_long_2.cpp
> @@ -21,8 +21,8 @@ void compiler_long_2(void)
>
> // Run random tests
> for (int32_t i = 0; 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();
> }
> src1[4] = 1;
> OCL_MAP_BUFFER(0);
> --
> 1.7.9.5
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list