[Openswan dev] libosw (fwd)
paul at xelerance.com
Wed Sep 14 11:43:28 EDT 2011
On Tue, 13 Sep 2011, D. Hugh Redelmeier wrote:
> | I'm using libopenswan (initsubnet, etc.) in another project.
> | We just discovered that gcc-4.5 is even more pedantic.
> | initsubnet.c: In function 'initsubnet':
> | initsubnet.c:38:2: error: new qualifiers in middle of multi-level non-const cast are unsafe
I did not get this on gcc 4.5.1?
> Here's what I GUESS would pass any purity test. This replaces the call
> to addrbytesptr in initsubnet.
> const unsigned char *q;
> n = addrbytesptr(&dst->addr, &q);
> p = (unsigned char *) (void *) &dst->addr;
> p += (const unsigned char *)q - p;
I'll check this change. Thanks for the suggestion.
> I don't subscribe to the users list and the archive seems to be down
> at the moment.
Seems to work for me?
More information about the Dev