diff --git a/lib/c_glib/src/thrift/c_glib/transport/thrift_server_transport.c b/lib/c_glib/src/thrift/c_glib/transport/thrift_server_transport.c
index 6873011..8354f80 100644
--- a/lib/c_glib/src/thrift/c_glib/transport/thrift_server_transport.c
+++ b/lib/c_glib/src/thrift/c_glib/transport/thrift_server_transport.c
@@ -36,7 +36,7 @@
 thrift_server_transport_updateKnownMessageSize(ThriftServerTransport *transport, glong size, GError **error)
 {
   gboolean boolean = TRUE;
-  ThriftServerTransport *tst = THRIFT_TRANSPORT (transport);
+  ThriftServerTransport *tst = THRIFT_SERVER_TRANSPORT (transport);
   ThriftServerTransportClass *tstc = THRIFT_SERVER_TRANSPORT_GET_CLASS (transport);
   glong consumed = tst->knowMessageSize_ - tst->remainingMessageSize_;
   if(!tstc->resetConsumedMessageSize (transport, size, error))
@@ -176,6 +176,7 @@
 thrift_server_transport_class_init (ThriftServerTransportClass *c)
 {
   GObjectClass *gobject_class = G_OBJECT_CLASS (c);
+  ThriftServerTransportClass *tstc = THRIFT_SERVER_TRANSPORT_CLASS (c);
   GParamSpec *param_spec = NULL;
   
   /* setup accessors and mutators */
@@ -216,10 +217,10 @@
   c->listen = thrift_server_transport_listen;
   c->accept = thrift_server_transport_accept;
   c->close = thrift_server_transport_close;
-  c->updateKnownMessageSize = thrift_server_transport_updateKnownMessageSize;
-  c->checkReadBytesAvailable = thrift_server_transport_checkReadBytesAvailable;
-  c->resetConsumedMessageSize = thrift_server_transport_resetConsumedMessageSize;
-  c->countConsumedMessageBytes = thrift_server_transport_countConsumedMessageBytes;
+  tstc->updateKnownMessageSize = thrift_server_transport_updateKnownMessageSize;
+  tstc->checkReadBytesAvailable = thrift_server_transport_checkReadBytesAvailable;
+  tstc->resetConsumedMessageSize = thrift_server_transport_resetConsumedMessageSize;
+  tstc->countConsumedMessageBytes = thrift_server_transport_countConsumedMessageBytes;
 }
 
 static void
diff --git a/lib/c_glib/src/thrift/c_glib/transport/thrift_server_transport.h b/lib/c_glib/src/thrift/c_glib/transport/thrift_server_transport.h
index 0fb55c0..9bf7901 100644
--- a/lib/c_glib/src/thrift/c_glib/transport/thrift_server_transport.h
+++ b/lib/c_glib/src/thrift/c_glib/transport/thrift_server_transport.h
@@ -63,10 +63,10 @@
   gboolean (*listen) (ThriftServerTransport *transport, GError **error);
   ThriftTransport *(*accept) (ThriftServerTransport *transport, GError **error);
   gboolean (*close) (ThriftServerTransport *transport, GError **error);
-  gboolean (*updateKnownMessageSize) (ThriftTransport *transport, glong size, GError **error);
-  gboolean (*checkReadBytesAvailable) (ThriftTransport *transport, glong numBytes, GError **error);
-  gboolean (*resetConsumedMessageSize) (ThriftTransport *transport, glong newSize, GError **error);
-  gboolean (*countConsumedMessageBytes) (ThriftTransport *transport, glong numBytes, GError **error);
+  gboolean (*updateKnownMessageSize) (ThriftServerTransport *transport, glong size, GError **error);
+  gboolean (*checkReadBytesAvailable) (ThriftServerTransport *transport, glong numBytes, GError **error);
+  gboolean (*resetConsumedMessageSize) (ThriftServerTransport *transport, glong newSize, GError **error);
+  gboolean (*countConsumedMessageBytes) (ThriftServerTransport *transport, glong numBytes, GError **error);
 };
 
 /* used by THRIFT_TYPE_SERVER_TRANSPORT */
diff --git a/lib/c_glib/src/thrift/c_glib/transport/thrift_ssl_socket.c b/lib/c_glib/src/thrift/c_glib/transport/thrift_ssl_socket.c
index 3778302..0afcb1b 100644
--- a/lib/c_glib/src/thrift/c_glib/transport/thrift_ssl_socket.c
+++ b/lib/c_glib/src/thrift/c_glib/transport/thrift_ssl_socket.c
@@ -69,6 +69,8 @@
 /* This array will store all of the mutexes available to OpenSSL. */
 static MUTEX_TYPE *thrift_ssl_socket_global_mutex_buf=NULL;
 
+gboolean
+thrift_ssl_socket_authorize(ThriftTransport * transport, GError **error);
 
 /**
  * OpenSSL uniq id function.
@@ -245,7 +247,7 @@
       gchar byte;
       rc = SSL_peek(ssl_socket->ssl, &byte, 1);
       if (rc < 0) {
-	  thrift_ssl_socket_get_ssl_error(ssl_socket, "Check socket data",
+	  thrift_ssl_socket_get_ssl_error(ssl_socket, (const guchar*)"Check socket data",
 					  THRIFT_SSL_SOCKET_ERROR_SSL, rc, error);
       }
       if (rc == 0) {
@@ -315,7 +317,7 @@
 	      continue;
 	  }
       }else{
-	  thrift_ssl_socket_get_ssl_error(ssl_socket, "Receive error",
+	  thrift_ssl_socket_get_ssl_error(ssl_socket, (const guchar*)"Receive error",
 					  THRIFT_SSL_SOCKET_ERROR_SSL, bytes, error);
 
       }
@@ -351,7 +353,7 @@
       ret = SSL_write (ssl_socket->ssl, (guint8 *)buf + sent, len - sent);
       if (ret < 0)
 	{
-	  thrift_ssl_socket_get_ssl_error(ssl_socket, "Send error",
+	  thrift_ssl_socket_get_ssl_error(ssl_socket, (const guchar*)"Send error",
 					  THRIFT_SSL_SOCKET_ERROR_SSL, ret, error);
 	  return FALSE;
 	}
@@ -423,7 +425,7 @@
 	  rc = SSL_connect(ssl_socket->ssl);
       }
       if (rc <= 0) {
-	  thrift_ssl_socket_get_ssl_error(ssl_socket, "Error while connect/bind", THRIFT_SSL_SOCKET_ERROR_CONNECT_BIND, rc, error);
+	  thrift_ssl_socket_get_ssl_error(ssl_socket, (const guchar*)"Error while connect/bind", THRIFT_SSL_SOCKET_ERROR_CONNECT_BIND, rc, error);
 	  return FALSE;
       }
   }else
@@ -851,7 +853,7 @@
   }
 
   if (context == NULL) {
-      thrift_ssl_socket_get_error("No cipher overlay", THRIFT_SSL_SOCKET_ERROR_CIPHER_NOT_AVAILABLE, error);
+      thrift_ssl_socket_get_error((const guchar*)"No cipher overlay", THRIFT_SSL_SOCKET_ERROR_CIPHER_NOT_AVAILABLE, error);
       return NULL;
   }
   SSL_CTX_set_mode(context, SSL_MODE_AUTO_RETRY);
diff --git a/lib/c_glib/src/thrift/c_glib/transport/thrift_transport.c b/lib/c_glib/src/thrift/c_glib/transport/thrift_transport.c
index b876b07..9d3f25e 100644
--- a/lib/c_glib/src/thrift/c_glib/transport/thrift_transport.c
+++ b/lib/c_glib/src/thrift/c_glib/transport/thrift_transport.c
@@ -309,6 +309,7 @@
   /* setup accessors and mutators */
   gobject_class->get_property = thrift_transport_get_property;
   gobject_class->set_property = thrift_transport_set_property;
+  gobject_class->dispose = thrift_transport_dispose;
   
   param_spec = g_param_spec_object ("configuration",
                                     "configuration (construct)",
diff --git a/lib/c_glib/test/testmemorybuffer.c b/lib/c_glib/test/testmemorybuffer.c
index 9fb68b9..cc9c56c 100755
--- a/lib/c_glib/test/testmemorybuffer.c
+++ b/lib/c_glib/test/testmemorybuffer.c
@@ -186,7 +186,6 @@
 test_read_and_write_external (void)
 {
   ThriftMemoryBuffer *tbuffer = NULL;
-  gchar *b;
   GError *error = NULL;
   GByteArray *buf = g_byte_array_new ();
   g_assert (buf != NULL);
diff --git a/lib/c_glib/test/testthriftbinaryreadcheck.c b/lib/c_glib/test/testthriftbinaryreadcheck.c
index 36454ca..f1caba8 100644
--- a/lib/c_glib/test/testthriftbinaryreadcheck.c
+++ b/lib/c_glib/test/testthriftbinaryreadcheck.c
@@ -173,7 +173,7 @@
                             "port", port, "path", NULL, 
                             "configuration", tconfiguration, NULL);
     transport = THRIFT_TRANSPORT (tsocket);
-    THRIFT_TRANSPORT_GET_CLASS (tsocket)->resetConsumedMessageSize(tsocket, -1, NULL);
+    THRIFT_TRANSPORT_GET_CLASS (tsocket)->resetConsumedMessageSize(THRIFT_TRANSPORT (tsocket), -1, NULL);
     thrift_transport_open (transport, NULL);
     g_assert (thrift_transport_is_open (transport));
 
@@ -221,9 +221,7 @@
     ThriftType element_type = T_VOID, 
                key_type = T_VOID, 
                value_type = T_VOID; 
-    gint32 ret = 0;
     guint32 size = 0;
-    glong tempsize = 0;
 
     ThriftConfiguration *tconfiguration = g_object_new (THRIFT_TYPE_CONFIGURATION,
                                                         "max_message_size", MAX_MESSAGE_SIZE,
diff --git a/lib/c_glib/test/testthriftbufferedreadcheck.c b/lib/c_glib/test/testthriftbufferedreadcheck.c
index 1472072..4870ae8 100755
--- a/lib/c_glib/test/testthriftbufferedreadcheck.c
+++ b/lib/c_glib/test/testthriftbufferedreadcheck.c
@@ -38,7 +38,6 @@
 static void
 test_open_and_close(void)
 {
-  ThriftConfiguration *tconfiguration = NULL;
   ThriftSocket *tsocket = NULL;
   ThriftTransport *transport = NULL;
   GError *err = NULL;
diff --git a/lib/c_glib/test/testthriftcompactreadcheck.c b/lib/c_glib/test/testthriftcompactreadcheck.c
index 03466ae..e2547d4 100644
--- a/lib/c_glib/test/testthriftcompactreadcheck.c
+++ b/lib/c_glib/test/testthriftcompactreadcheck.c
@@ -217,7 +217,7 @@
   ThriftTransport *client = NULL;
   ThriftCompactProtocol *tc = NULL;
   ThriftProtocol *protocol = NULL;
-  ThriftType element_type, key_type, value_type, field_type;
+  ThriftType element_type, key_type, value_type;
   guint32 size = 0;
 
   ThriftConfiguration *tconfiguration = g_object_new (THRIFT_TYPE_CONFIGURATION, "max_message_size", MAX_MESSAGE_SIZE,
diff --git a/lib/c_glib/test/testtransportsslsocket.c b/lib/c_glib/test/testtransportsslsocket.c
index 3c2644d..ba9ffdc 100644
--- a/lib/c_glib/test/testtransportsslsocket.c
+++ b/lib/c_glib/test/testtransportsslsocket.c
@@ -103,7 +103,7 @@
   GError *error=NULL;
 
   GObject *object = NULL;
-  object = thrift_ssl_socket_new(SSLTLS, &error);
+  object = (GObject *)thrift_ssl_socket_new(SSLTLS, &error);
   g_object_get (G_OBJECT(object), "hostname", &hostname, "port", &port, "ssl_context", &ssl_ctx, NULL);
   g_assert (ssl_ctx!=NULL);
 
@@ -180,7 +180,6 @@
   ThriftSSLSocket *tSSLSocket = NULL;
   ThriftTransport *transport = NULL;
   GError *error=NULL;
-  char buffer[] = "this must not break";
 
   /* open a connection and close it */
   tSSLSocket = thrift_ssl_socket_new_with_host(SSLTLS, "localhost", 51188+1, &error);
@@ -267,13 +266,13 @@
   /* loop through all the results and connect to the first we can */
   char dnshost[INET6_ADDRSTRLEN]; /* bigger addr supported IPV6 */
   char socket_ip[INET6_ADDRSTRLEN];
-  if(inet_ntop(addr->ss_family, get_in_addr(addr), socket_ip, INET6_ADDRSTRLEN)==socket_ip){
+  if(inet_ntop(addr->ss_family, get_in_addr((struct sockaddr*)addr), socket_ip, INET6_ADDRSTRLEN)==socket_ip){
       g_debug("We are connected to host %s checking against certificate...", socket_ip);
       int sizeip = socket_ip!=NULL ? strlen(socket_ip) : 0;
       for(p = addr_info; p != NULL; p = p->ai_next) {
 	  if(inet_ntop(p->ai_family, get_in_addr((struct sockaddr *)p->ai_addr), dnshost, INET6_ADDRSTRLEN)==dnshost){
 	      if(dnshost!=NULL){
-		  g_info("DNS address [%i -> %s]", p->ai_addr, dnshost);
+		  g_info("DNS address [%i -> %s]", ((guint32)(p->ai_addrlen)), dnshost);
 		  if(!strncmp(dnshost, socket_ip, sizeip)){
 		      retval=1;
 		      break; /* if we get here, we must have connected successfully */
@@ -289,7 +288,7 @@
   return retval;
 }
 
-static void
+static void 
 read_from_file(char *buffer, long size, const char *file_name)
 {
   char ch;
@@ -330,7 +329,7 @@
   }
   char *tmp = BN_bn2dec(bn);
   if (!tmp) {
-      g_warning(stderr, "unable to convert BN to decimal string.\n");
+      g_warning((const char*)stderr, "unable to convert BN to decimal string.\n");
       BN_free(bn);
       return EXIT_FAILURE;
   }
@@ -342,7 +341,7 @@
       return EXIT_FAILURE;
     }
   */
-  if(!strncmp(serial_number, tmp, strlen(serial_number))){
+  if(!strncmp((const char*)serial_number, tmp, strlen((const char*)serial_number))){
       retval=TRUE;
   }else{
       g_warning("Serial number is not valid");
@@ -356,6 +355,8 @@
 gboolean my_access_manager(ThriftTransport * transport, X509 *cert, struct sockaddr_storage *addr, GError **error)
 {
   ThriftSSLSocket *sslSocket = THRIFT_SSL_SOCKET (transport);
+  THRIFT_UNUSED_VAR (error);
+  THRIFT_UNUSED_VAR (sslSocket);
 
   g_info("Processing access to the server");
   X509_NAME* iname = cert ? X509_get_issuer_name(cert) : NULL;
@@ -368,11 +369,11 @@
       g_info("Issuer (cn) %s", issuer);
 
       /* Issuer pinning */
-      if(strncmp(ISSUER_CN_PINNING, issuer, strlen(ISSUER_CN_PINNING))){
+      if(strncmp(ISSUER_CN_PINNING, (const char*)issuer, strlen(ISSUER_CN_PINNING))){
 	  g_warning("The Issuer of the certificate is not valid");
 	  valid=FALSE;
       }
-      OPENSSL_free(issuer);
+      OPENSSL_free((void*)issuer);
       if(!valid)
 	return valid;
   }
@@ -385,7 +386,7 @@
       gboolean valid = TRUE;
 
       /* Subject pinning */
-      if(strncmp(SUBJECT_CN_PINNING, subject, strlen(SUBJECT_CN_PINNING))){
+      if(strncmp(SUBJECT_CN_PINNING, (const char*)subject, strlen(SUBJECT_CN_PINNING))){
 	  g_warning("The subject of the certificate is not valid");
 	  valid=FALSE;
       }
@@ -394,19 +395,19 @@
 	return valid;
 
       /* Host pinning       */
-      if(verify_ip(subject, addr)){
+      if(verify_ip((char*)subject, addr)){
 	  g_info("Verified subject");
       }else{
 	  g_info("Cannot verify subject");
 	  valid=FALSE;
       }
-      OPENSSL_free(subject);
+      OPENSSL_free((void*)subject);
 
       if(!valid)
 	return valid;
   }
 
-  if(!verify_certificate_sn(cert, CERT_SERIAL_NUMBER)){
+  if(!verify_certificate_sn(cert, (const unsigned char*)CERT_SERIAL_NUMBER)){
       return FALSE;
   }else{
       g_info("Verified serial number");
@@ -487,7 +488,7 @@
   ThriftServerTransport *transport = NULL;
   ThriftTransport *client = NULL;
   guchar buf[10]; /* a buffer */
-  guchar match[10] = TEST_DATA;
+  guchar match[] = TEST_DATA;
 
   ThriftServerSocket *tsocket = g_object_new (THRIFT_TYPE_SERVER_SOCKET,
 					      "port", port, NULL);
