[PATCH 2/4] Initialize variables (and silence GCC's -Wunused-variable warning)

Sergio Durigan Junior sergiodj en sergiodj.net
Lun Abr 14 06:10:35 UTC 2014


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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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);
-- 
1.9.0



Más información sobre la lista de distribución Softwares-impostos