Am Montag, 29. Januar 2007 schrieb Giel van Schijndel:
> On Mon, 29 Jan 2007 13:00:43 +0100, Dennis Schridde <[EMAIL PROTECTED]> 
wrote:
> > Am Montag, 29. Januar 2007 schrieb Giel van Schijndel:
> >> On Sun, 28 Jan 2007 20:59:17 -0800, "The Watermelon"
> >
> > <[EMAIL PROTECTED]> wrote:
> >> > On 1/28/07, Giel van Schijndel <[EMAIL PROTECTED]> wrote:
> >> >> Author: muggenhor
> >> >> Date: Sun Jan 28 19:19:32 2007
> >> >> New Revision: 686
> >> >>
> >> >> URL: http://svn.gna.org/viewcvs/warzone?rev=686&view=rev
> >> >> Log:
> >> >> Modification 8 by Watermelon's bugfix patch:
> >> >> * Changed establishTargetHeight in projectile.c to use pIMD rather
> >
> > than
> >
> >> >> displayImd for structures to fix some weird height
> >
> > problems(hopefully).
> >
> >> >> * Giel: Slightly changed the patch's modifications to increase code
> >> >> readability
> >> >>
> >> >> Refer: Message-ID: <
> >> >> [EMAIL PROTECTED]>
> >> >>
> >> >> Modified:
> >> >>    trunk/src/projectile.c
> >> >
> >> > some of your change swapped the correct order and causes crash:
> >> >
> >> >  *  height = asBodyStats[psDroid->asBits[COMP_BODY].nStat].pIMD->ymax
> >
> > -
> >
> >> > asBodyStats[psDroid->asBits[COMP_BODY].nStat].pIMD->ymin;*
> >> >
> >> > *   psDroid = (DROID*)psTarget;*
> >> >
> >> > it tried to access psDroid pointer before it gets initialized as
> >> > (DROID*)psTarget,the original/correct order is:
> >> >
> >> > *   psDroid = (DROID*)psTarget;
> >> >    height = asBodyStats[psDroid->asBits[COMP_BODY].nStat].pIMD->ymax -
> >> > asBodyStats[psDroid->asBits[COMP_BODY].nStat].pIMD->ymin;*
> >>
> >> It seems Ari fixed this in r688. Would have been nice if the compiler
> >
> > would
> >
> >> just kick my ass on this sorts of cases (dereferencing uninitialized
> >> pointers).
> >
> > I thought GCC does with -Wall...
>
> I believe it does, yes. The only problem is that I need to distinguish
> those warnings from the ones already present.
>
> Hmm, maybe that's a nice idea for some spare time: writing a diff-utility
> that generates diffs on compiler warnings/errors. Although maybe a bit far
> fetched.

That's how I do it, actually.
Before starting to work on something or before examining a patch I run:
./waf clean && ./waf --debug > gcc_warnings_old.log
And afterwards:
./waf clean && ./waf --debug > gcc_warnings_new.log && diff -u 
gcc_warnings_old.log gcc_warnings_new.log > gcc_warnings.diff
(Waf is the build-tool the wscript in the trunk is for. You could achive the 
same by using make, probably.)

--Dennis

Attachment: pgpMkUhsKJysK.pgp
Description: PGP signature

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to