changeset 19549:5f4100c7dd00

Fix compiler warnings about having a variable declaration after some code, and some casting to a variable of different signedness
author Mark Doliner <mark@kingant.net>
date Thu, 30 Aug 2007 07:16:37 +0000
parents e2135da444a5
children 0a6ed4e36ca8
files libpurple/plugins/ssl/ssl-gnutls.c
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugins/ssl/ssl-gnutls.c	Thu Aug 30 07:03:12 2007 +0000
+++ b/libpurple/plugins/ssl/ssl-gnutls.c	Thu Aug 30 07:16:37 2007 +0000
@@ -130,9 +130,6 @@
 
 		purple_ssl_close(gsc);
 	} else {
-		purple_debug_info("gnutls", "Handshake complete\n");
-
-		/* TODO: Remove all this debugging babble */
 		/* Now we are cooking with gas! */
 		PurpleSslOps *ops = purple_ssl_get_ops();
 		GList * peers = ops->get_peer_certificates(gsc);
@@ -141,6 +138,10 @@
 			purple_certificate_find_scheme("x509");
 
 		GList * l;
+
+		/* TODO: Remove all this debugging babble */
+		purple_debug_info("gnutls", "Handshake complete\n");
+
 		for (l=peers; l; l = l->next) {
 			PurpleCertificate *crt = l->data;
 			GByteArray *z =
@@ -165,6 +166,7 @@
 		  const gnutls_datum_t *cert_list;
 		  unsigned int cert_list_size = 0;
 		  gnutls_session_t session=gnutls_data->session;
+		  int i;
 		  
 		  cert_list =
 		    gnutls_certificate_get_peers(session, &cert_list_size);
@@ -172,7 +174,6 @@
 		  purple_debug_info("gnutls",
 				    "Peer provided %d certs\n",
 				    cert_list_size);
-		  int i;
 		  for (i=0; i<cert_list_size; i++)
 		    {
 		      gchar fpr_bin[256];
@@ -191,7 +192,7 @@
 						      fpr_bin, &fpr_bin_sz);
 		      
 		      fpr_asc =
-			purple_base16_encode_chunked(fpr_bin,fpr_bin_sz);
+			purple_base16_encode_chunked((const guchar *)fpr_bin, fpr_bin_sz);
 		      
 		      purple_debug_info("gnutls", 
 					"Lvl %d SHA1 fingerprint: %s\n",
@@ -200,7 +201,7 @@
 		      tsz=sizeof(tbuf);
 		      gnutls_x509_crt_get_serial(cert,tbuf,&tsz);
 		      tasc=
-			purple_base16_encode_chunked(tbuf, tsz);
+			purple_base16_encode_chunked((const guchar *)tbuf, tsz);
 		      purple_debug_info("gnutls",
 					"Serial: %s\n",
 					tasc);