[Freeciv-Dev] (PR#6781) Cleanups
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] (PR#6781) Cleanups |
From: |
rt@xxxxxxxxxxx |
Date: |
Thu, 6 Nov 2003 05:30:46 -0800 |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=6781 >
The attached patch:
- changes assert(p) to assert(p!=NULL). The old version gives
compiler warnings on 64bit systems.
- add some bool related cleanups
- rerun create_lsend.pl
In addition there are some cases where I'm not sure what to do:
1)
ai/advdiplomacy.c: (in function greed)
ai/advdiplomacy.c:107:22: Initializer block for band_incr has 5 elements, but
declared as int [6]: 5, 5, 10, 20, 30
ai/advdiplomacy.c:108:25: Initializer block for band_rate has 6 elements, but
declared as int [7]: 10, 25, 50, 100, 250, 500
2)
ai/aiunit.c:591:134: Expression has undefined behavior (left operand
uses errno, modified by right operand): log(most_desirable / ((((100 *
5 * 81 + 100 * (9 - 5) * 51) + 1) + 1) + (100 * 5 * 81 + 100 * (9 - 5)
* 51))) / log(0.6)
Code has unspecified behavior. Order of evaluation of function
parameters or subexpressions is not defined, so if a value is used and
modi fied in different places not separated by a sequence point
constraining evaluation order, then the result of the expression is
unspecified.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Many of my assistants were fans of Tolkien, who wrote 'Lord of the Rings'
and a number of other children's stories for adults. The first character
alphabet that was programmed for my plotter was Elvish rather than Latin."
-- from SAIs "life as a computer for a quarter of a century"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#6781) Cleanups,
rt <=
|
|