can't validate on Mac

Hi devs, In a (almost) clean validate on my MacOS 10.8 machine, I see this: {{{ rts/posix/OSMem.c: In function 'my_mmap': rts/posix/OSMem.c:109:15: error: error: variable 'flags' set but not used [-Werror=unused-but-set-variable] int prot, flags; ^ rts/posix/OSMem.c:109:9: error: error: variable 'prot' set but not used [-Werror=unused-but-set-variable] int prot, flags; ^ cc1: all warnings being treated as errors }}} Help? Thanks, Richard

what about this loittle patch?
diff --git a/rts/posix/OSMem.c b/rts/posix/OSMem.c
index 125ae10..edb240a 100644
--- a/rts/posix/OSMem.c
+++ b/rts/posix/OSMem.c
@@ -145,6 +145,7 @@ my_mmap (void *addr, W_ size, int operation)
kern_return_t err = 0;
ret = addr;
+ (void)prot;
if(operation & MEM_RESERVE)
{
On 8/3/15, Richard Eisenberg
Hi devs,
In a (almost) clean validate on my MacOS 10.8 machine, I see this:
{{{ rts/posix/OSMem.c: In function 'my_mmap':
rts/posix/OSMem.c:109:15: error: error: variable 'flags' set but not used [-Werror=unused-but-set-variable] int prot, flags; ^
rts/posix/OSMem.c:109:9: error: error: variable 'prot' set but not used [-Werror=unused-but-set-variable] int prot, flags; ^ cc1: all warnings being treated as errors }}}
Help?
Thanks, Richard

I'm sure that would work, but I'm worried this is a symptom of a deeper problem. Does anyone know what's going on here? This is holding up two patches of mine.
Thanks!
Richard
On Aug 3, 2015, at 10:28 AM, Gabor Greif
what about this loittle patch?
diff --git a/rts/posix/OSMem.c b/rts/posix/OSMem.c index 125ae10..edb240a 100644 --- a/rts/posix/OSMem.c +++ b/rts/posix/OSMem.c @@ -145,6 +145,7 @@ my_mmap (void *addr, W_ size, int operation)
kern_return_t err = 0; ret = addr; + (void)prot;
if(operation & MEM_RESERVE) {
On 8/3/15, Richard Eisenberg
wrote: Hi devs,
In a (almost) clean validate on my MacOS 10.8 machine, I see this:
{{{ rts/posix/OSMem.c: In function 'my_mmap':
rts/posix/OSMem.c:109:15: error: error: variable 'flags' set but not used [-Werror=unused-but-set-variable] int prot, flags; ^
rts/posix/OSMem.c:109:9: error: error: variable 'prot' set but not used [-Werror=unused-but-set-variable] int prot, flags; ^ cc1: all warnings being treated as errors }}}
Help?
Thanks, Richard
participants (2)
-
Gabor Greif
-
Richard Eisenberg