From: Sergio Durigan Junior Date: Mon, 14 Apr 2014 05:15:39 +0000 (-0300) Subject: Initialize variables (and silence GCC's -Wunused-variable warning) X-Git-Tag: v2014.2~7 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Frnetclient.git;a=commitdiff_plain;h=50c7ce56c548d669dc9ef4cc0386f79cb7f50a2a Initialize variables (and silence GCC's -Wunused-variable warning) Using -Wunused-variable to compile the code, GCC gives a false positive about two variables in the code. This commit initializes those variables to sane values, in order to silence this warning. --- diff --git a/rnetclient.c b/rnetclient.c index 3273a9c..3b9ce1e 100644 --- a/rnetclient.c +++ b/rnetclient.c @@ -312,8 +312,8 @@ static int rnet_send(gnutls_session_t session, char *buffer, size_t len, int hea static int rnet_recv(gnutls_session_t session, struct rnet_message **message) { - char *out; - size_t olen; + char *out = NULL; + size_t olen = 0; char *buffer; size_t len; rnet_message_expand(message, 6);