[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] [Highwire] gcc4



Am Mittwoch, den 08.09.2010, 20:38 +0200 schrieb Peter Slegg
<p.slegg@scubadivers.co.uk>:

> 
> Now I am back to dealing with:
> 
> error: cast discards qualifiers from pointer target type
> const char *cmd = *(const char **)&msg[3];
> 
> you would think that all those const would keep it happy ;-)

You are casting the temporary value, but not the value that is finally
assigned to cmd... 
try this:

const char *cmd = (const char*) *(const char **)&msg[3];

Or maybe it should be: 
const char *cmd = (const char*)*(char **)&msg[3]; 

;) 

why don't you turn off warnings-as-errors before rewriting so much data
type stuff... 
Wouldn't it be better if you fix the warnings when you know enough
about them? These warnings about qualifiers don't cause bad things,
IMO.... 

greets,
m