From a37452448f6f2ad114fcd7adaf25128ca31dd2c6 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Tue, 9 Dec 2008 10:57:10 +0100 Subject: [PATCH] libcollectdclient: Build the library using -Wall -Werror. Fixed two minor issues detected by those flags. --- src/libcollectdclient/Makefile.am | 4 ++++ src/libcollectdclient/client.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libcollectdclient/Makefile.am b/src/libcollectdclient/Makefile.am index f96db631..ca505603 100644 --- a/src/libcollectdclient/Makefile.am +++ b/src/libcollectdclient/Makefile.am @@ -1,5 +1,9 @@ AUTOMAKE_OPTIONS = foreign no-dependencies +if COMPILER_IS_GCC +AM_CFLAGS = -Wall -Werror +endif + pkginclude_HEADERS = client.h lib_LTLIBRARIES = libcollectdclient.la diff --git a/src/libcollectdclient/client.c b/src/libcollectdclient/client.c index f2c0a1e5..96b828ea 100644 --- a/src/libcollectdclient/client.c +++ b/src/libcollectdclient/client.c @@ -61,6 +61,7 @@ #include #include #include +#include #include #include "client.h" @@ -152,7 +153,7 @@ static char *lcc_strdup (const char *str) /* {{{ */ } /* }}} char *lcc_strdup */ __attribute__((nonnull (1, 2))) -static char *lcc_strescape (char *dest, char *src, size_t dest_size) /* {{{ */ +static char *lcc_strescape (char *dest, const char *src, size_t dest_size) /* {{{ */ { size_t dest_pos; size_t src_pos; -- 2.11.0