[Openswan dev] libosw (fwd)

D. Hugh Redelmeier hugh at mimosa.com
Sat Sep 24 15:43:05 EDT 2011


| From: Paul Wouters <paul at xelerance.com>

| Date: Wed, 14 Sep 2011 11:43:28 -0400 (EDT)

Sorry for the very slow reply.

| 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?

I think that that is good.  Maybe we don't need the ugly work-around
that I formulated.

It could also be that MCR builds with more -W flags (pure suposition
on my part).

MCR: what flags did you use?

| > 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.

If it isn't needed, it would be great to NOT do this.  It makes the
code way more obscure.

| > I don't subscribe to the users list and the archive seems to be down
| > at the moment.
| 
| Seems to work for me?
| http://lists.openswan.org/pipermail/users/

Due to a broken-down security gateway.


More information about the Dev mailing list