[Freeciv-Dev] Re: Fw: common/nation.c compile warning
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, 23 Mar 2006 23:49:48 +0300
Egor Vyscrebentsov wrote:
> svn trunk r11793
>
> $ make
> ...
> freeciv/common/nation.c: In function `add_new_nation_group':
> freeciv/common/nation.c:351: warning: 'group' might be used
> uninitialized in this function
> make[4]: *** [nation.o] Error 1
>
> and the code in nation.c:351 (add_new_nation_group) was not understood
> by me:
>
> struct nation_group *group;
>
> if (strlen(name) >= ARRAY_SIZE(group->name)) {
> freelog(LOG_FATAL, "Too-long group name %s.", group->name);
> exit(EXIT_FAILURE);
> }
This seems to be a typo in freelog: 'name' should be used rather than
'group->name'
--
Thanks, evyscr
nation_group.diff
Description: Text Data
|
|