Bug#462566: FTBFS with GCC 4.3: type qualifiers ignored on function return type

Eddy Petrișor eddy.petrisor at gmail.com
Sat Feb 16 00:21:06 UTC 2008


# debatable, but it should be fairly trivial to port
tags 462566 patch
thanks

Martin Michlmayr wrote:
> Package: wormux
> Version: 0.8beta4-1
> Severity: important
> Usertags: ftbfs-gcc-4.3
> 
> Your package fails to build with GCC 4.3.  Version 4.3 has not been
> released yet but I'm building with a snapshot in order to find errors
> and give people an advance warning.
> 
> You can reproduce this problem with gcc-4.3 or gcc-snapshot from
> unstable.
> 
>> Automatic build of wormux_0.8beta4-1 on em64t by sbuild/amd64 0.53
> ...
>> Execute make to compile then execute make install to install...
>> /usr/bin/make -C . 
>> make[1]: Entering directory `/build/tbm/wormux-0.8beta4'
>> Making all in data
>> make[2]: Entering directory `/build/tbm/wormux-0.8beta4/data'
>> make[2]: Nothing to be done for `all'.
>> make[2]: Leaving directory `/build/tbm/wormux-0.8beta4/data'
>> Making all in src
>> make[2]: Entering directory `/build/tbm/wormux-0.8beta4/src'
>> /usr/bin/make  all-recursive
>> make[3]: Entering directory `/build/tbm/wormux-0.8beta4/src'
>> Making all in .
>> make[4]: Entering directory `/build/tbm/wormux-0.8beta4/src'
>> g++ -DHAVE_CONFIG_H -I.   -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I ../src -DINSTALL_DATADIR=\"/usr/share/games/wormux\" -DINSTALL_LOCALEDIR=\"/usr/share/locale\" -DFONT_FILE=\"/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf\" -DPACKAGE_VERSION=\"0.8beta4\"  -Werror -Wall -Wextra -O2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DPNG_NO_MMX_CODE -I/usr/include/libpng12   -I/usr/include/libxml++-2.6 -I/usr/include/libxml2 -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include    -DPNG_NO_MMX_CODE -I/usr/include/libpng12   -c -o ai_engine.o `test -f 'ai/ai_engine.cpp' || echo './'`ai/ai_engine.cpp
>> cc1plus: warnings being treated as errors
>> In file included from ./tool/error.h:55,
>>                  from ./include/base.h:62,
>>                  from ./ai/ai_movement_module.h:24,
>>                  from ./ai/ai_engine_stupid.h:24,
>>                  from ai/ai_engine.cpp:25:
>> ./network/network.h:80: error: type qualifiers ignored on function return type
>> ./network/network.h:130: error: type qualifiers ignored on function return type
>> ./network/network.h:131: error: type qualifiers ignored on function return type
>> ./network/network.h:132: error: type qualifiers ignored on function return type
>> ./network/network.h:133: error: type qualifiers ignored on function return type
>> ./network/network.h:149: error: type qualifiers ignored on function return type
>> In file included from ./tool/point.h:28,
>>                  from ./ai/ai_movement_module.h:25,
>>                  from ./ai/ai_engine_stupid.h:24,
>>                  from ai/ai_engine.cpp:25:
>> ./tool/vector2.h: In member function 'double Vector2<T>::ComputeAngle() const':
>> ./tool/vector2.h:388: error: suggest explicit braces to avoid ambiguous 'else'
>> In file included from ./object/physical_obj.h:30,
>>                  from ./character/character.h:28,
>>                  from ai/ai_engine.cpp:26:
>> ./object/physics.h: At global scope:
>> ./object/physics.h:86: error: type qualifiers ignored on function return type
>> ./object/physics.h:89: error: type qualifiers ignored on function return type
>> ./object/physics.h:92: error: type qualifiers ignored on function return type
>> ./object/physics.h:95: error: type qualifiers ignored on function return type
>> ./object/physics.h:98: error: type qualifiers ignored on function return type
>> In file included from ./team/team.h:31,
>>                  from ai/ai_engine.cpp:28:
>> ./weapon/weapon.h:302: error: type qualifiers ignored on function return type
>> make[4]: *** [ai_engine.o] Error 1
>> make[4]: Leaving directory `/build/tbm/wormux-0.8beta4/src'
> 


I have just finished and committed (r4065) a patch against upstream 
trunk that fixes this issue.

svn://svn.gna.org/svn/wormux/trunk@4065

Now I am too tired to backport it to sid's wormux right now, but here is 
patch attached for reference. I'll probably backport this by the end of 
the weekend.


-- 
Regards,
EddyP
=============================================
"Imagination is more important than knowledge" A.Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wormux-svn-gcc-4.3.patch
Type: text/x-diff
Size: 13342 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20080216/f779a23c/attachment-0001.patch 


More information about the Pkg-games-devel mailing list