diff options
author | Michael Steinert <mike.steinert@gmail.com> | 2012-05-16 10:42:44 -0600 |
---|---|---|
committer | Michael Steinert <mike.steinert@gmail.com> | 2012-05-17 11:44:45 -0600 |
commit | 162fc19f4d896c3db862f1da303823dcbe9780ec (patch) | |
tree | 36656320e462ca62575afa30931a7301162732f8 /tools/common.c | |
parent | a4881f40d2862f193cc38f9759564370004215c4 (diff) | |
download | rabbitmq-c-github-ask-162fc19f4d896c3db862f1da303823dcbe9780ec.tar.gz |
Fix compiler warnings (checked clang & gcc)
Signed-off-by: Michael Steinert <mike.steinert@gmail.com>
Diffstat (limited to 'tools/common.c')
-rw-r--r-- | tools/common.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/common.c b/tools/common.c index 71ae07d..2c248b9 100644 --- a/tools/common.c +++ b/tools/common.c @@ -30,7 +30,7 @@ * ***** END LICENSE BLOCK ***** */ -#ifndef HAVE_CONFIG_H +#ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -181,7 +181,7 @@ struct poptOption connect_options[] = { "the username to login with", "username"}, {"password", 0, POPT_ARG_STRING, &amqp_password, 0, "the password to login with", "password"}, - { NULL, 0, 0, NULL, 0 } + { NULL, '\0', 0, NULL, 0, NULL, NULL } }; static void init_connection_info(struct amqp_connection_info *ci) @@ -331,7 +331,8 @@ amqp_bytes_t read_all(int fd) bytes.len = 0; for (;;) { - ssize_t res = read(fd, bytes.bytes+bytes.len, space-bytes.len); + ssize_t res = read(fd, (char *)bytes.bytes + bytes.len, + space-bytes.len); if (res == 0) break; @@ -360,7 +361,7 @@ void write_all(int fd, amqp_bytes_t data) die_errno(errno, "write"); data.len -= res; - data.bytes += res; + data.bytes = (char *)data.bytes + res; } } |