[quake3-bugzilla] [Bug 4960] unused but set variables

bugzilla-daemon at icculus.org bugzilla-daemon at icculus.org
Tue Apr 26 14:52:22 EDT 2011


https://bugzilla.icculus.org/show_bug.cgi?id=4960

--- Comment #1 from Ben Millwood <bugzilla at benmachine.co.uk> 2011-04-26 14:52:22 EDT ---
Created attachment 2666
  --> https://bugzilla.icculus.org/attachment.cgi?id=2666
i -> latest

At least one of the warnings seems to be a genuine bug:

> code/botlib/be_ai_move.c: In function ‘BotResetLastAvoidReach’:
> code/botlib/be_ai_move.c:3512:26: warning: array subscript is above array bounds [-Warray-bounds]

Indeed, in the code in question, i will always be MAX_AVOIDREACH so the index
will be out of bounds.

The attached patch makes the code do what I think it meant to do, although not
being very familiar with the botlib I'm not completely sure.

-- 
Configure bugmail: https://bugzilla.icculus.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the quake3-bugzilla mailing list