changeset 17498:53bd10a83322

- Eliminate some warnings
author William Ehlhardt <williamehlhardt@gmail.com>
date Tue, 29 May 2007 21:00:08 +0000
parents e0eb1eb5b47b
children 15550eab4e27 c5913175c5d2
files libpurple/plugins/ssl/ssl-gnutls.c
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugins/ssl/ssl-gnutls.c	Tue May 29 20:50:06 2007 +0000
+++ b/libpurple/plugins/ssl/ssl-gnutls.c	Tue May 29 21:00:08 2007 +0000
@@ -137,10 +137,10 @@
   else
     {
       /* Grab the first certificate and display some data about it */
-      gchar fpr_bin[256];     /* Raw binary key fingerprint */
+      guchar fpr_bin[256];     /* Raw binary key fingerprint */
       gsize fpr_bin_sz = sizeof(fpr_bin); /* Size of above (used later) */
       gchar * fpr_asc = NULL; /* ASCII representation of key fingerprint */
-      gchar ser_bin[256];     /* Certificate Serial Number field */
+      guchar ser_bin[256];     /* Certificate Serial Number field */
       gsize ser_bin_sz = sizeof(ser_bin);
       gchar * ser_asc = NULL;
       gchar dn[1024];          /* Certificate Name field */
@@ -215,7 +215,7 @@
 
 	g_free(primary);
 	g_free(secondary);
-      }
+      } /* End dialog construction */
 
 
       /* Cleanup! */
@@ -223,7 +223,7 @@
       g_free(ser_asc);
 
       gnutls_x509_crt_deinit(cert);
-    }
+    } /* if (0 == ... */
 }
 
 static void ssl_gnutls_handshake_cb(gpointer data, gint source,
@@ -259,6 +259,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);
@@ -266,16 +267,17 @@
 		  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];
+		      guchar fpr_bin[256];
 		      gsize fpr_bin_sz = sizeof(fpr_bin);
 		      gchar * fpr_asc = NULL;
-		      gchar tbuf[256];
+		      guchar tbuf[256];
 		      gsize tsz=sizeof(tbuf);
 		      gchar * tasc = NULL;
 		      gnutls_x509_crt_t cert;
+		      int ret;
 		      
 		      gnutls_x509_crt_init(&cert);
 		      gnutls_x509_crt_import (cert, &cert_list[i],
@@ -292,7 +294,7 @@
 					i, fpr_asc);
 		      
 		      tsz=sizeof(tbuf);
-		      int ret = gnutls_x509_crt_get_serial(cert,tbuf,&tsz);
+		      gnutls_x509_crt_get_serial(cert,tbuf,&tsz);
 		      tasc=
 			purple_base16_encode_chunked(tbuf, tsz);
 		      purple_debug_info("gnutls",