Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2006:
[Freeciv-Dev] Fw: common/nation.c compile warning
Home

[Freeciv-Dev] Fw: common/nation.c compile warning

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Fw: common/nation.c compile warning
From: Egor Vyscrebentsov <evyscr@xxxxxxxxx>
Date: Thu, 23 Mar 2006 23:49:48 +0300

Begin forwarded message:

Date: Thu, 23 Mar 2006 23:07:42 +0300
From: Egor Vyscrebentsov <evyscr@xxxxxxxxx>
To: bugs@xxxxxxxxxxx
Subject: common/nation.c compile warning


Good daytime!

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);
  }

-- 
Thanks, evyscr



[Prev in Thread] Current Thread [Next in Thread]