Initialize variables (and silence GCC's -Wunused-variable warning)
authorSergio Durigan Junior <sergiodj@sergiodj.net>
Mon, 14 Apr 2014 05:15:39 +0000 (02:15 -0300)
committerSergio Durigan Junior <sergiodj@sergiodj.net>
Mon, 14 Apr 2014 05:17:00 +0000 (02:17 -0300)
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.

rnetclient.c

index 3273a9c..3b9ce1e 100644 (file)
@@ -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);