Não é mais possível fazer postagens ou usar assinaturas novas da Usenet nos Grupos do Google. O conteúdo histórico continua disponível.
Dismiss

Bug#459289: FTBFS with GCC 4.3: misc warnings and -Werror

2 visualizações
Pular para a primeira mensagem não lida

Martin Michlmayr

não lida,
5 de jan. de 2008, 06:10:1205/01/2008
para
Package: xorp
Version: 1.5~cvs.20070824-1
Usertags: ftbfs-gcc-4.3
Tags: patch

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.

GCC 4.3 will introduce some new warnings that your build treats as
errors because of -Werror. A patch is below.


> Automatic build of xorp_1.5~cvs.20070824-1 on em64t by sbuild/amd64 0.53
....
> /bin/sh ../libtool --tag=CC --mode=compile x86_64-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -Wall -g -Werror -W -Wall -Wwrite-strings -Wbad-function-cast -Wmissing-prototypes -Wcast-qual -Wmissing-declarations -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs -pipe -MT strptime.lo -MD -MP -MF .deps/strptime.Tpo -c -o strptime.lo strptime.c
> x86_64-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -Wall -g -Werror -W -Wall -Wwrite-strings -Wbad-function-cast -Wmissing-prototypes -Wcast-qual -Wmissing-declarations -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs -pipe -MT strptime.lo -MD -MP -MF .deps/strptime.Tpo -c strptime.c -o strptime.o
> cc1: warnings being treated as errors
> strptime.c:233: error: 'local_strptime' defined but not used
> make[4]: *** [strptime.lo] Error 1

and later:

> /usr/lib/gcc-snapshot/bin/g++ -DHAVE_CONFIG_H -I. -I.. -I.. -g -Werror -W -Wall -Wwrite-strings -Wcast-qual -Wpointer-arith -Wcast-align -Woverloaded-virtual -ftemplate-depth-25 -pipe -MT xrl_parser.lo -MD -MP -MF .deps/xrl_parser.Tpo -c xrl_parser.cc -o xrl_parser.o
> cc1plus: warnings being treated as errors
> xrl_parser.cc: In function 'size_t skip_xrl_plain_chars(const std::string&, __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&)':
> xrl_parser.cc:132: error: suggest a space before ';' or explicit braces around empty body in 'for' statement
> make[2]: *** [xrl_parser.lo] Error 1
> make[2]: Leaving directory `/home/tbm/src/xorp-1.5~cvs.20070824/libxipc'

and:

> /usr/lib/gcc-snapshot/bin/g++ -DHAVE_CONFIG_H -I. -I.. -I.. -DINSTANTIATE_IPV4 -g -Werror -W -Wall -Wwrite-strings -Wcast-qual -Wpointer-arith -Wcast-align -Woverloaded-virtual -ftemplate-depth-25 -pipe -MT librip_la-packet_queue.lo -MD -MP -MF .deps/librip_la-packet_queue.Tpo -c packet_queue.cc -o librip_la-packet_queue.o
> cc1plus: warnings being treated as errors
> packet_queue.cc: In member function 'void PacketQueue<A>::enqueue_packet(const RipPacket<A>*)':
> packet_queue.cc:44: error: suggest a space before ';' or explicit braces around empty body in 'while' statement
> make[3]: *** [librip_la-packet_queue.lo] Error 1
> make[3]: Leaving directory `/home/tbm/src/xorp-1.5~cvs.20070824/rip'

--- libxipc/xrl_parser.cc~ 2008-01-05 10:14:39.000000000 +0000
+++ libxipc/xrl_parser.cc 2008-01-05 10:15:04.000000000 +0000
@@ -129,7 +129,7 @@
skip_xrl_plain_chars(const string& input, string::const_iterator& sci)
{
string::const_iterator start = sci;
- for (; sci != input.end() && isxrlplain(*sci); sci++);
+ for (; sci != input.end() && isxrlplain(*sci); sci++) ;
return sci - start;
}

--- libxorp/strptime.c~ 2008-01-05 10:09:29.000000000 +0000
+++ libxorp/strptime.c 2008-01-05 10:11:53.000000000 +0000
@@ -221,6 +221,8 @@
#define LEGAL_ALT(x) { if (alt_format & ~(x)) return NULL; }


+#ifndef HAVE_STRPTIME
+
static const unsigned char *conv_num(const unsigned char *, int *,
unsigned int, unsigned int);
static const unsigned char *find_string(const unsigned char *, int *,
@@ -489,6 +491,7 @@
*dest = result;
return buf;
}
+#endif

/*
* XXX: The Windows' equivalent of strncasecmp(3) is called _strnicmp()
@@ -500,6 +503,7 @@
#define STRNCASECMP(s1, s2, len) strncasecmp(s1, s2, len)
#endif

+#ifndef HAVE_STRPTIME
static const unsigned char *
find_string(const unsigned char *bp, int *tgt, const char * const *n1,
const char * const *n2, int c)
@@ -521,6 +525,7 @@
/* Nothing matched */
return NULL;
}
+#endif

char *
xorp_strptime(const char *buf, const char *fmt, struct tm *tm)
--- rip/packet_queue.cc~ 2008-01-05 10:44:39.000000000 +0000
+++ rip/packet_queue.cc 2008-01-05 10:44:43.000000000 +0000
@@ -41,7 +41,7 @@
PacketQueue<A>::enqueue_packet(const RipPacket<A>* pkt)
{
while (_buffered_bytes + pkt->data_bytes() >= _max_buffered_bytes
- && drop_old() == true);
+ && drop_old() == true) ;
_buffered_bytes += pkt->data_bytes();
_ready_packets.push_back(pkt);
}

--
Martin Michlmayr
http://www.cyrius.com/

--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

0 nova mensagem