[physfs] Re: more warnings

Dennis Schridde devurandom at gmx.net
Sun Mar 9 07:06:06 EDT 2008


Am Sonntag, 9. März 2008 03:49:27 schrieb Ryan C. Gordon:
> > I did not get very far, but attached my patch anyway.
> > Hope someone can take it further.
> > (It includes the pointer signing patch from above.)
>
> The pointer signing patch is committed, svn revision #930.
>
> I think gcc will disable strict aliasing rules if you cast something to
> a (char *) first (the theory being that lots of legacy code breaks if
> you can't rely on that), so it should probably fix the type-punning
> warnings, too...
>
> So can you tell me if this fixes it?
That "fixes" it...
The patch I attached does that and marks it with a big fat warning, since I 
think one should not rely on such hidden triggers.

More warnings are created by inclusion of my system (well, devpkg) headers 
being included before physfs' own ones. 
(I.e. "-I/home/devpkg/devpkg/include ... -I/home/devpkg/src/physfs-svn/." 
results in devpkg/include/physfs.h being included before physfs-svn/physfs.h)

If it is somehow possible, I'd appreciate if the CMake supplied CFLAGS could 
be moved after the custom ones. (This worked with automake somehow.)
If this is a CMake problem, I'll report it there instead...

--Dennis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: no_type_punning_hack.patch
Type: text/x-diff
Size: 861 bytes
Desc: not available
URL: <http://icculus.org/pipermail/physfs/attachments/20080309/289392ed/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://icculus.org/pipermail/physfs/attachments/20080309/289392ed/attachment.pgp>


More information about the physfs mailing list