From 7d8f0bb686b587203a6533bba4f4764ed6f51d5f Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 2 Feb 2013 01:31:20 +0100 Subject: [PATCH 01/11] lib/compat/vasprintf.c: make this build and fix sign-compare warnings. --- lib/compat/vasprintf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/compat/vasprintf.c b/lib/compat/vasprintf.c index d73892e..3d86aee 100644 --- lib/compat/vasprintf.c +++ lib/compat/vasprintf.c @@ -32,6 +32,7 @@ #include #include #include +#include "compat.h" int HIDDEN vasprintf(char **ret, const char *fmt, va_list ap) @@ -54,7 +55,7 @@ vasprintf(char **ret, const char *fmt, va_list ap) return -1; } - if (retval < len) { + if (retval < (int)len) { new_buf = realloc(buf, retval + 1); if (new_buf == NULL) *ret = buf; @@ -71,7 +72,7 @@ vasprintf(char **ret, const char *fmt, va_list ap) return -1; } retval = vsnprintf(buf, len, fmt, ap); - if (retval != len - 1) { + if (retval != (int)len - 1) { free(buf); *ret = NULL; return -1; -- 1.8.1.1