lkml.org 
[lkml]   [2018]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v5 0/2] Remove false-positive VLAs when using max()
Date
From: Kees Cook
> Sent: 22 March 2018 15:01
...
> > /* Glory to Martin Uecker <Martin.Uecker@med.uni-goettingen.de> */
> > #define __is_constant(a) \
> > (sizeof(int) == sizeof(*(1 ? ((void*)((a) * 0l)) : (int*)1)))
...
> So, this time it's not a catastrophic failure with gcc 4.4. Instead it
> fails in 11 distinct places:
...
> Seems like it doesn't like void * arguments:
>
> mm/percpu.c:
> void *ptr;
> ...
> base = min(ptr, base);

Try adding (unsigned long) before the (a).

David

\
 
 \ /
  Last update: 2018-03-22 16:14    [W:0.088 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site