[Mesa-dev] [PATCH] intel/aubinator: fix 32bit shift overflow warning

Eduardo Lima Mitev elima at igalia.com
Sun Dec 11 18:49:50 UTC 2016


Looks good.

Reviewed-by: Eduardo Lima Mitev <elima at igalia.com>

Will push this and the other ones I reviewed.

Thanks!

Eduardo

On 12/10/2016 08:10 PM, Grazvydas Ignotas wrote:
> Doesn't look like this can work on 32bit, just rids of annoying
> warning.
> 
> Signed-off-by: Grazvydas Ignotas <notasas at gmail.com>
> ---
> no commit access, somebody please push
> 
>  src/intel/tools/aubinator.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/intel/tools/aubinator.c b/src/intel/tools/aubinator.c
> index 5e3a684..e2bec8f 100644
> --- a/src/intel/tools/aubinator.c
> +++ b/src/intel/tools/aubinator.c
> @@ -1297,7 +1297,7 @@ int main(int argc, char *argv[])
>        file = aub_file_open(input_file);
>  
>     /* mmap a terabyte for our gtt space. */
> -   gtt_size = 1ul << 40;
> +   gtt_size = 1ull << 40;
>     gtt = mmap(NULL, gtt_size, PROT_READ | PROT_WRITE,
>                MAP_PRIVATE | MAP_ANONYMOUS |  MAP_NORESERVE, -1, 0);
>     if (gtt == MAP_FAILED) {
> 



More information about the mesa-dev mailing list