From bb994d5c904ac54a892ee378c99ec71c22420608 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 24 Mar 2011 23:11:46 -0700 Subject: [PATCH] Added -pedantic, fixed warning. --- libguac/Makefile.am | 2 +- libguac/src/protocol.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libguac/Makefile.am b/libguac/Makefile.am index e12ea9e6..82e7fa7e 100644 --- a/libguac/Makefile.am +++ b/libguac/Makefile.am @@ -37,7 +37,7 @@ AUTOMAKE_OPTIONS = foreign ACLOCAL_AMFLAGS = -I m4 -AM_CFLAGS = -Werror -Wall -Iinclude +AM_CFLAGS = -Werror -Wall -pedantic -Iinclude libguacincdir = $(includedir)/guacamole libguacinc_HEADERS = include/client.h include/guacio.h include/protocol.h include/log.h diff --git a/libguac/src/protocol.c b/libguac/src/protocol.c index c0bac8da..ff37ca17 100644 --- a/libguac/src/protocol.c +++ b/libguac/src/protocol.c @@ -175,12 +175,14 @@ int guac_send_args(GUACIO* io, const char** args) { for (i=0; args[i] != NULL; i++) { + char* escaped; + if (i > 0) { if (guac_write_string(io, ",")) return -1; } - char* escaped = guac_escape_string(args[i]); + escaped = guac_escape_string(args[i]); if (guac_write_string(io, escaped)) { free(escaped); return -1;