From 990f932ea4c2aadecf554d7aa59045f862c566ff Mon Sep 17 00:00:00 2001 From: Alan Antonuk Date: Tue, 22 May 2012 12:34:03 -0400 Subject: Adding more strict compile Warning flags to gcc build Added: -Wall -Wextra -pedantic -Wstrict-prototypes -Wcast-align -Wno-unused-function -fno-common -fvisibility=hidden The library compiles cleanly with the exception of the tools dir which has trouble with the initializer lists --- tools/common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/common.c b/tools/common.c index 2c248b9..70f3bca 100644 --- a/tools/common.c +++ b/tools/common.c @@ -34,6 +34,8 @@ #include "config.h" #endif +/* needed for asnprintf */ +#define _GNU_SOURCE #include #include #include @@ -200,12 +202,13 @@ static void init_connection_info(struct amqp_connection_info *ci) "Parsing URL '%s'", amqp_url); if (amqp_server) { + char *colon; if (ci->host) die("both --server and --url options specify" " server host"); /* parse the server string into a hostname and a port */ - char *colon = strchr(amqp_server, ':'); + colon = strchr(amqp_server, ':'); if (colon) { char *port_end; size_t host_len; -- cgit v1.2.1