changeset 908:ed611e15f744

Fix a few warnings, thank you Thomas again
author Sebastien Decugis <sdecugis@freediameter.net>
date Sat, 19 Jan 2013 16:35:48 +0100
parents b772af200865
children 047f99b09632
files libfdcore/core.c libfdcore/peers.c libfdproto/msg_log.c
diffstat 3 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libfdcore/core.c	Wed Dec 19 23:55:22 2012 +0100
+++ b/libfdcore/core.c	Sat Jan 19 16:35:48 2013 +0100
@@ -35,7 +35,9 @@
 
 #include "fdcore-internal.h"
 
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 #include <gcrypt.h>
+#pragma GCC diagnostic warning "-Wdeprecated-declarations"
 
 /* The static configuration structure */
 static struct fd_config g_conf;
--- a/libfdcore/peers.c	Wed Dec 19 23:55:22 2012 +0100
+++ b/libfdcore/peers.c	Sat Jan 19 16:35:48 2013 +0100
@@ -542,7 +542,7 @@
 	
 	/* Send the new connection event to the PSM */
 	CHECK_MALLOC_DO( ev_data = malloc(sizeof(struct cnx_incoming)), { ret = ENOMEM; goto out; } );
-	memset(ev_data, 0, sizeof(ev_data));
+	memset(ev_data, 0, sizeof(*ev_data));
 	
 	ev_data->cer = msg;
 	ev_data->cnx = *cnx;
--- a/libfdproto/msg_log.c	Wed Dec 19 23:55:22 2012 +0100
+++ b/libfdproto/msg_log.c	Sat Jan 19 16:35:48 2013 +0100
@@ -160,6 +160,7 @@
 			TODO("Log to arg directory in a new file");
 			TODO("Log a note to debug stream");
 			break;
+		default:
 	}
 	
 	/* For file methods, let's parse the message so it looks better */
@@ -197,6 +198,7 @@
 		case FD_MSG_LOGTO_DIR:
 			TODO("close?");
 			break;
+		default:
 	}
 }
 
"Welcome to our mercurial repository"