Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Sep 2009 18:10:42 GMT
From:      "Ond&#345;ej Majerech" <oxyd.oxyd@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/138971: games/wesnoth fails to build with "warning: 'res' may be used uninitialized in this function"
Message-ID:  <200909191810.n8JIAg4d085937@www.freebsd.org>
Resent-Message-ID: <200909191820.n8JIK2r0086054@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         138971
>Category:       ports
>Synopsis:       games/wesnoth fails to build with "warning: 'res' may be used uninitialized in this function"
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 19 18:20:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Ond&#345;ej Majerech
>Release:        7.2-RELEASE-p2
>Organization:
>Environment:
FreeBSD starlight 7.2-RELEASE-p2 FreeBSD 7.2-RELEASE-p2 #5: Fri Jul  3 02:19:12 CEST 2009     root@starlight:/usr/obj/usr/src/sys/STARLIGHT  i386
>Description:
games/wesnoth v. 1.6.5 won't build:

	c++ -DHAVE_CONFIG_H -I. -I..   -I/usr/local/include -I/usr/local/include -I/usr/include -D_THREAD_SAFE -I/usr/local/include/pango-1.0 -I/usr/local/include/cairo -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2     -DHAVE_REVISION -I../intl -I../intl -I/usr/local/include/SDL -I/usr/local/include -D_GNU_SOURCE=1 -D_REENTRANT  -DWESNOTH_PATH=\"/usr/local/share/wesnoth\" -DLOCALEDIR=\"/usr/local/share/locale\" -DHAS_RELATIVE_LOCALEDIR=0 -DFIFODIR=\"/var/run/wesnothd\" -DWESNOTH_PREFIX=\"/usr/local\" -O2 -W -Wall -ansi -Os -fno-strict-aliasing -pipe -march=athlon-mp -Werror -Wno-unused -Wno-sign-compare -DDISABLE_POOL_ALLOC  -DHAVE_FRIBIDI -I/usr/local/include/fribidi   -D_X11  -I/usr/local/include    -I/usr/local/include -MT actions.o -MD -MP -MF $depbase.Tpo -c -o actions.o actions.cpp &&\
	mv -f $depbase.Tpo $depbase.Po
cc1plus: warnings being treated as errors
game.cpp: In member function 'bool<unnamed>::game_controller::play_multiplayer()':
game.cpp:1307: warning: 'res' may be used uninitialized in this function
gmake[2]: *** [game.o] Error 1

Upstream says this is a GCC bug: http://gna.org/bugs/?13355 .  Workaround is to add --disable-strict-compilation to configure flags.

My compiler:
> c++ --version
c++ (GCC) 4.2.1 20070719  [FreeBSD]
>How-To-Repeat:
cd /usr/ports/games/wesnoth && make
>Fix:


Patch attached with submission follows:

diff -u -p -r /usr/ports/games/wesnoth/Makefile wesnoth/Makefile
--- /usr/ports/games/wesnoth/Makefile	2009-09-19 19:45:36.000000000 +0200
+++ wesnoth/Makefile	2009-09-19 19:53:47.000000000 +0200
@@ -31,7 +31,8 @@ CONFIGURE_ARGS=	--localstatedir=/var \
 		--with-icondir=${PREFIX}/share/pixmaps \
 		--with-libiconv-prefix=${LOCALBASE} \
 		--with-libintl-prefix=${LOCALBASE} \
-		--with-localedir=${PREFIX}/share/locale
+		--with-localedir=${PREFIX}/share/locale \
+		--disable-strict-compilation
 
 MANLANG_GAME=	gl sk
 MANLANG=	"" cs de en_GB es et fi fr hu it lt pl sr sr@latin sv tr \


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909191810.n8JIAg4d085937>