----- Original Message -----
From: "Dennis Schridde" <[EMAIL PROTECTED]>
To: "Development list" <warzone-dev@gna.org>
Sent: Wednesday, November 01, 2006 1:00 PM
Subject: Re: [Warzone-dev] Patches for removing some warnings
Am Mittwoch, 1. November 2006 12:27 schrieb Gerard Krol:
Hi all,
Attached are 2 sets of changes to remove some warnings. Those in
warnings_casts.patch cast variables back to what they were before the
binary operations, for example:
- sVal.type = (*InstrPointer) & OPCODE_DATAMASK;
+ sVal.type = (INTERP_TYPE)((*InstrPointer) &
OPCODE_DATAMASK);
I think this is quite harmless.
warnings_changes.patch changes the types of some variables and adds
calls to keyCodeToSDLKey in some assert statements.
A quick look-through told me that this looks good. (Especially the
explanation
helped a lot! Makes a difference if one is just blindly trying to silence
the
compiler or if he has good reasons to cast in specific places.)
Will look at it further and test it later, probably on the WE.
--Dennis
Devurandom, since these patches are compatible with TSVN, I can do it if
that's ok with you.
All patches seem to be ok, although i'm not sure if we really need
keyCodeToSDLKey() or if just casting will suffice. I don't know if
keyCodeToSDLKey() might do more in the future than just casting.
And if I understand the original intention correctly
return((PICKTILE)TRUE);
should probably be chnaged to:
return HALF_FREE_TILE;
though.
Troman
_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev