#3401: Compile error in function ‘int checkSockets(const SocketSet*, unsigned
int)’
------------------------------------+--------------------
Reporter: NoQ | Type: bug
Status: new | Priority: normal
Milestone: unspecified | Component: other
Version: git/master | Keywords:
Blocked By: | Blocking:
Operating System: GNU/Linux 32bit |
------------------------------------+--------------------
Suddenly having trouble compiling the latest master.
{{{
...
Making all in lib/netplay
make[2]: Entering directory `/home/noq/wz/warzone2100/lib/netplay'
g++ -DHAVE_CONFIG_H -I. -I../.. -D_GNU_SOURCE=1 -D_REENTRANT
-I/usr/include/SDL -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DDEBUG
-DWZ_DATADIR="\"/usr/local/share/warzone2100\""
-DLOCALEDIR="\"/usr/local/share/locale\"" -I../.. -I../../3rdparty
-I../../3rdparty/quesoglc -DQT_SHARED -I/usr/include/QtCore
-I/usr/include/QtNetwork -I/usr/include/QtScript -O0 -g -Werror -Wno-
enum-compare -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wcast-
align -Wwrite-strings -Wpointer-arith -Wno-format-security -DQT_SHARED
-I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtScript
-fstack-protector -MT netsocket.o -MD -MP -MF .deps/netsocket.Tpo -c -o
netsocket.o netsocket.cpp
netsocket.cpp: In function ‘int checkSockets(const SocketSet*, unsigned
int)’:
netsocket.cpp:849:65: error: narrowing conversion of ‘(timeout / 1000u)’
from ‘unsigned int’ to ‘__time_t {aka long int}’ inside { } is ill-formed
in C++11 [-Werror=narrowing]
netsocket.cpp:849:65: error: narrowing conversion of ‘((timeout % 1000u) *
1000u)’ from ‘unsigned int’ to ‘__suseconds_t {aka long int}’ inside { }
is ill-formed in C++11 [-Werror=narrowing]
netsocket.cpp: In function ‘Socket* socketOpen(const SocketAddress*,
unsigned int)’:
netsocket.cpp:1133:66: error: narrowing conversion of ‘(timeout / 1000u)’
from ‘unsigned int’ to ‘__time_t {aka long int}’ inside { } is ill-formed
in C++11 [-Werror=narrowing]
netsocket.cpp:1133:66: error: narrowing conversion of ‘((timeout % 1000u)
* 1000u)’ from ‘unsigned int’ to ‘__suseconds_t {aka long int}’ inside { }
is ill-formed in C++11 [-Werror=narrowing]
cc1plus: all warnings being treated as errors
make[2]: *** [netsocket.o] Error 1
make[2]: Leaving directory `/home/noq/wz/warzone2100/lib/netplay'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/noq/wz/warzone2100'
make: *** [all] Error 2
}}}
Reverting a few commits doesn't help, but it seems that i updated GCC
recently:
{{{
[2012-04-10 12:57] upgraded gcc (4.6.2-7 -> 4.7.0-3)
}}}
(i'm on archlinux, and this is a line from pacman.log)
(well, there were other updates too ...)
--
Ticket URL: <http://developer.wz2100.net/ticket/3401>
Warzone 2100 Trac <http://developer.wz2100.net/>
The Warzone 2100 Project
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Warzone2100-project mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/warzone2100-project