diff options
author | Alan Antonuk <aega@med.umich.edu> | 2012-05-22 12:34:03 -0400 |
---|---|---|
committer | Alan Antonuk <aega@med.umich.edu> | 2012-05-24 15:46:50 -0400 |
commit | 990f932ea4c2aadecf554d7aa59045f862c566ff (patch) | |
tree | 5de9b6f235557b5963de761ab4f0f136c0f97808 /tools | |
parent | 970ccbc411c47c72920f1a6c94366ff8dd95a2fe (diff) | |
download | rabbitmq-c-github-ask-990f932ea4c2aadecf554d7aa59045f862c566ff.tar.gz |
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
Diffstat (limited to 'tools')
-rw-r--r-- | tools/common.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 <stdio.h> #include <stdlib.h> #include <stdarg.h> @@ -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; |