[Freeciv-Dev] [bug #21386] fit_nationset_to_players(): 'least_misfits' may be used uninitialized in this function

2014-08-27 Thread Jacob Nevins
Update of bug #21386 (project freeciv):

  Status:  Ready For Test => Fixed  
 Open/Closed:Open => Closed 


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #21386] fit_nationset_to_players(): 'least_misfits' may be used uninitialized in this function

2014-08-25 Thread Jacob Nevins
Update of bug #21386 (project freeciv):

  Status:None => Ready For Test 
 Assigned to:None => jtn
 Planned Release:2.5.0, 2.6.0 => 2.5.0-beta2, 2.6.0 

___

Follow-up Comment #7:

Untested patch for the specific issue of the title.
I don't have a compiler that complains about this, so I haven't confirmed that
it actually makes the warning go away; testing welcome.

(file #21838)
___

Additional Item Attachment:

File name: trunk-S2_5-warning-least_misfits.patch Size:1 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #21386] fit_nationset_to_players(): 'least_misfits' may be used uninitialized in this function

2014-07-15 Thread Jacob Nevins
Update of bug #21386 (project freeciv):

 Planned Release: 2.5.0,2.6.0 => 2.5.0, 2.6.0   

___

Follow-up Comment #6:

Those are all things we should fix, but let's keep this ticket for its
subject.

I've raised bug #22351 for your warnings in comment #5 (ignoring the Lua
stuff, although it is worth knowing that our built-in Lua might be hopeless on
ARM).

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #21386] fit_nationset_to_players(): 'least_misfits' may be used uninitialized in this function

2014-01-31 Thread Christian Knoke
Follow-up Comment #5, bug #21386 (project freeciv):

There are more compile errors/warnings with different options to autogen.sh.
So I list them here detailed.


1. The platform is Debian Wheezy on ARMv5 - not Squeeze, sorry. 


2. Compile 2.4.1 with pure ./autogen.sh (GTK2 client)
=> OK (see below)

3. Compile 2.4.1 with ./autogen.sh --enable-debug=yes (GTK2 client)
==> error#0 (as posted in comment#2)

4. Compile 2.4.1 with ./autogen.sh --enable-debug=yes --enable-svnrev
--with-readline --enable-ipv6=yes --enable-client=no
==> error#0 (see comment#2)

5. Compile 2.4.1 with ./autogen.sh --enable-debug=yes --enable-sys-lua (GTK2
client)
==> error#1 (same as in 7.) (posted below)

6. Compile 2.5.99 rev. 24312 with pure ./autogen.sh (GTK2 client)  ==> OK (see
below)

7. Compile 2.5.99 rev. 24312 with ./autogen.sh --enable-debug=yes (GTK2
client) 
==> error#1 (posted below)

8. Compile 2.5.99 rev. 24312 with ./autogen.sh --enable-debug=yes
--enable-svnrev --with-readline --enable-ipv6=yes --enable-client=no 
==> error#2 (posted below)

9. Compile 2.5.99 rev. 24312 with ./autogen.sh --enable-debug=yes
--enable-svnrev --with-readline --enable-ipv6=yes --enable-client=no
--enable-sys-lua (no client)
==> error#2 (same as in 8.) (posted below)



=
freeciv-2.4.1
=


ad 2)

./autogen.sh 

  == General build options ==
  Shared libraries:  no
  Debugging support: some
  Profiling support: no
  IPv6 support:  yes
  Map image toolkits:auto
ppm:   built-in
MagickWand:no

  == Client ==
  Build freeciv client:  yes

  Maintained client frontends:
Gtk-2.0: yes
Gtk-3.0: no
SDL: no
Xaw: no
Stub:no

  In-development client frontends:
  (these are not yet ready for general use)
QT:  no

  == Server ==
  Build freeciv server:  yes
AI modules support:no
Database support:  no
  mysql: no
  postgres:  no
  sqlite3:   no

OK
==

---
ad 5)

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I. -I./..
-I./../include -I../../utility -I../../common -I../../common/aicore
-I../../common/scriptcore -I./../agents -I./../luascript -pthread
-I/usr/include/gtk-2.0 -I/usr/lib/arm-linux-gnueabi/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0
-I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0
-I/usr/lib/arm-linux-gnueabi/glib-2.0/include -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/libpng12
-DLOCALEDIR=\"/usr/local/share/locale\" -DBINDIR=\"/usr/local/bin\"
-DFC_CONF_PATH=\"/usr/local/etc/freeciv\"
"-DDEFAULT_DATA_PATH=\".:data:~/.freeciv/2.4:/usr/local/share/freeciv\""
-DDEFAULT_SAVES_PATH=\"\"
"-DDEFAULT_SCENARIO_PATH=\".:data/scenarios:~/.freeciv/2.4/scenarios:~/.freeciv/scenarios:/usr/local/share/freeciv/scenarios\""
-Wall -Wpointer-arith -Wcast-align -Werror -Wmissing-prototypes
-Wmissing-declarations -Wformat -Wformat-security -Wnested-externs
-Wno-deprecated-declarations -g -O2 -MT chatline.lo -MD -MP -MF
.deps/chatline.Tpo -c chatline.c -o chatline.o
chatline.c: In function 'scroll_if_necessary':
chatline.c:550:34: error: cast increases required alignment of target type
[-Werror=cast-align]
chatline.c: In function 'chatline_is_scrolled_to_bottom':
chatline.c:974:34: error: cast increases required alignment of target type
[-Werror=cast-align]
cc1: all warnings being treated as errors
make[4]: *** [chatline.lo] Fehler 1
make[4]: Leaving directory
`/home/chris/freeciv/release/freeciv-2.4.1/client/gui-gtk-2.0'
make[3]: *** [all] Fehler 2
make[3]: Leaving directory
`/home/chris/freeciv/release/freeciv-2.4.1/client/gui-gtk-2.0'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/home/chris/freeciv/release/freeciv-2.4.1/client'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/chris/freeciv/release/freeciv-2.4.1'
make: *** [all] Fehler 2



=
SVN Rev: 24312 2.5.99
=

---
ad 6)

./autogen.sh 

  == General build options ==
  Shared libraries:  no
  Debugging support: some
  Profiling support: no
  IPv6 support:  yes
  Map image toolkits:auto
ppm:   built-in
MagickWand:no

  == Client ==
  Build freeciv client:  yes

  Maintained client frontends:
Gtk-3.0: no
Gtk-2.0: yes
SDL: no
Xaw: no
Stub:no

  In-development client frontends:
  (these are not yet ready for general use)
QT:  no
SDL2:no

  == Server ==
  Build freeciv server:  yes
AI modules support:no
Database support:  no
  mysql: no
  postgres:  no
  sqlite3:  

[Freeciv-Dev] [bug #21386] fit_nationset_to_players(): 'least_misfits' may be used uninitialized in this function

2014-01-30 Thread Christian Knoke
Follow-up Comment #4, bug #21386 (project freeciv):

Yes. I have thrown everything with lua in its name from squeeze on SD and the
server compiles ok (2.4.1 on ARMv5).

Christian


___

Reply to this item at:

  

___
  Nachricht gesendet von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #21386] fit_nationset_to_players(): 'least_misfits' may be used uninitialized in this function

2014-01-30 Thread Marko Lindqvist
Follow-up Comment #3, bug #21386 (project freeciv):

... lots of warnings from lapi.c ...

> make[4]: *** [lapi.lo] Fehler 1
> make[4]: Leaving directory `/home/chris/freeciv/release/freeciv-
> 2.4.1/dependencies/lua-5.1/src'

Those warnings are from copy of lua-5.1 included in freeciv tree. Upstream is
not going to fix them, and there's no point for us to make major patching,
especially given that 2.5 already uses lua-5.2.
Is it possible for you to build with --enable-sys-lua configure option that
uses lua present in the system (then being an requirement, obviously) instead
of building one included in freeciv tree?

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #21386] fit_nationset_to_players(): 'least_misfits' may be used uninitialized in this function

2014-01-30 Thread Christian Knoke
Follow-up Comment #2, bug #21386 (project freeciv):

here are more warnings/errors from 2.4.1 compile on sheeva, server only:

./configure --enable-debug=yes --enable-svnrev --with-readline
--enable-ipv6=yes --enable-client=no

HTH

Making all in src
make[4]: Entering directory
`/home/chris/freeciv/release/freeciv-2.4.1/dependencies/lua-5.1/src'
if /bin/bash ../../../libtool --preserve-dup-deps --tag=CC --mode=compile gcc
-DHAVE_CONFIG_H -I. -I. -I../../..   -DLOCALEDIR="\"/usr/local/share/locale\""
-DBINDIR="\"/usr/local/bin\"" -DFC_CONF_PATH="\"/usr/local/etc/freeciv\""
-DDEFAULT_DATA_PATH="\".:data:~/.freeciv/2.4:/usr/local/share/freeciv\""
-DDEFAULT_SAVES_PATH="\"\""
-DDEFAULT_SCENARIO_PATH="\".:data/scenarios:~/.freeciv/2.4/scenarios:~/.freeciv/scenarios:/usr/local/share/freeciv/scenarios\""
 -Wall -Wpointer-arith -Wcast-align -Werror -Wmissing-prototypes
-Wmissing-declarations -Wformat -Wformat-security -Wnested-externs
-Wno-deprecated-declarations -g -O2 -MT lapi.lo -MD -MP -MF ".deps/lapi.Tpo"
-c -o lapi.lo lapi.c; \
then mv -f ".deps/lapi.Tpo" ".deps/lapi.Plo"; else rm -f 
".deps/lapi.Tpo";
exit 1; fi
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I. -I../../..
-DLOCALEDIR=\"/usr/local/share/locale\" -DBINDIR=\"/usr/local/bin\"
-DFC_CONF_PATH=\"/usr/local/etc/freeciv\"
"-DDEFAULT_DATA_PATH=\".:data:~/.freeciv/2.4:/usr/local/share/freeciv\""
-DDEFAULT_SAVES_PATH=\"\"
"-DDEFAULT_SCENARIO_PATH=\".:data/scenarios:~/.freeciv/2.4/scenarios:~/.freeciv/scenarios:/usr/local/share/freeciv/scenarios\""
-Wall -Wpointer-arith -Wcast-align -Werror -Wmissing-prototypes
-Wmissing-declarations -Wformat -Wformat-security -Wnested-externs
-Wno-deprecated-declarations -g -O2 -MT lapi.lo -MD -MP -MF .deps/lapi.Tpo -c
lapi.c -o lapi.o
lapi.c: In function 'index2adr':
lapi.c:64:7: error: cast increases required alignment of target type
[-Werror=cast-align]
lapi.c: In function 'lua_createtable':
lapi.c:581:3: error: cast increases required alignment of target type
[-Werror=cast-align]
lapi.c: In function 'lua_getmetatable':
lapi.c:607:5: error: cast increases required alignment of target type
[-Werror=cast-align]
lapi.c: In function 'lua_getfenv':
lapi.c:623:7: error: cast increases required alignment of target type
[-Werror=cast-align]
lapi.c:626:7: error: cast increases required alignment of target type
[-Werror=cast-align]
lapi.c: In function 'lua_rawset':
lapi.c:678:3: error: cast increases required alignment of target type
[-Werror=cast-align]
lapi.c: In function 'lua_rawseti':
lapi.c:691:3: error: cast increases required alignment of target type
[-Werror=cast-align]
lapi.c: In function 'lua_setmetatable':
lapi.c:714:9: error: cast increases required alignment of target type
[-Werror=cast-align]
lapi.c:714:9: error: cast increases required alignment of target type
[-Werror=cast-align]
lapi.c:720:9: error: cast increases required alignment of target type
[-Werror=cast-align]
lapi.c:720:9: error: cast increases required alignment of target type
[-Werror=cast-align]
lapi.c: In function 'lua_setfenv':
lapi.c:750:7: error: cast increases required alignment of target type
[-Werror=cast-align]
lapi.c:756:12: error: cast increases required alignment of target type
[-Werror=cast-align]
lapi.c:756:12: error: cast increases required alignment of target type
[-Werror=cast-align]
cc1: all warnings being treated as errors
make[4]: *** [lapi.lo] Fehler 1
make[4]: Leaving directory
`/home/chris/freeciv/release/freeciv-2.4.1/dependencies/lua-5.1/src'
make[3]: *** [all-recursive] Fehler 1
make[3]: Leaving directory
`/home/chris/freeciv/release/freeciv-2.4.1/dependencies/lua-5.1'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory
`/home/chris/freeciv/release/freeciv-2.4.1/dependencies'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/chris/freeciv/release/freeciv-2.4.1'
make: *** [all] Fehler 2


___

Reply to this item at:

  

___
  Nachricht gesendet von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #21386] fit_nationset_to_players(): 'least_misfits' may be used uninitialized in this function

2014-01-29 Thread Jacob Nevins
Follow-up Comment #1, bug #21386 (project freeciv):

Another report in bug #21554.
Should get round to fixing this.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #21386] fit_nationset_to_players(): 'least_misfits' may be used uninitialized in this function

2013-12-28 Thread Jacob Nevins
URL:
  

 Summary: fit_nationset_to_players(): 'least_misfits' may be
used uninitialized in this function
 Project: Freeciv
Submitted by: jtn
Submitted on: Sat Dec 28 23:05:39 2013
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: Any
 Planned Release: 2.5.0,2.6.0

___

Details:

Split from bug #21370:

CC plrhand.lo
cc1: warnings being treated as errors
plrhand.c: In function ‘fit_nationset_to_players’:
plrhand.c:2227: error: ‘least_misfits’ may be used uninitialized in this
function

"Ubuntu 10.4 and gcc version 4.4.3."

Don't think the warning is correct -- it's protected by another variable
'best' -- but the compiler hasn't spotted this. (There is a potential use of
invalid data, best==NULL, if nation_set_count()==0, but that should never
happen.)
Some sort of warning suppression required.




___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev