Index: configure
===================================================================
--- configure	(revision d75597b0b31f8aa8ca523a3cfa4869e20fca8466)
+++ configure	(revision 56f260affd91651cb0c44ee14713f7dfa0717ad4)
@@ -137,5 +137,5 @@
 	echo '#define DEBUG' >> config.h
 else
-	[ -z "$CFLAGS" ] && CFLAGS=-O3
+	[ -z "$CFLAGS" ] && CFLAGS="-O2 -fno-strict-aliasing"
 fi
 
Index: lib/ssl_gnutls.c
===================================================================
--- lib/ssl_gnutls.c	(revision d75597b0b31f8aa8ca523a3cfa4869e20fca8466)
+++ lib/ssl_gnutls.c	(revision 56f260affd91651cb0c44ee14713f7dfa0717ad4)
@@ -35,4 +35,12 @@
 
 static gboolean initialized = FALSE;
+
+#include <limits.h>
+
+#if defined(ULONG_MAX) && ULONG_MAX > 4294967295UL
+#define GNUTLS_STUPID_CAST (long)
+#else
+#define GNUTLS_STUPID_CAST (int)
+#endif
 
 struct scd
@@ -125,5 +133,5 @@
 	
 	sock_make_nonblocking( conn->fd );
-	gnutls_transport_set_ptr( conn->session, (gnutls_transport_ptr) conn->fd );
+	gnutls_transport_set_ptr( conn->session, (gnutls_transport_ptr) GNUTLS_STUPID_CAST conn->fd );
 	
 	return ssl_handshake( data, source, cond );
Index: protocols/nogaim.c
===================================================================
--- protocols/nogaim.c	(revision d75597b0b31f8aa8ca523a3cfa4869e20fca8466)
+++ protocols/nogaim.c	(revision 56f260affd91651cb0c44ee14713f7dfa0717ad4)
@@ -699,5 +699,5 @@
 	
 	if( set_getbool( &ic->irc->set, "debug" ) )
-		imcb_log( ic, "You were removed from conversation 0x%x", (int) c );
+		imcb_log( ic, "You were removed from conversation %p", c );
 	
 	if( c )
@@ -755,5 +755,5 @@
 	else
 	{
-		imcb_log( ic, "Message from/to conversation %s@0x%x (unknown conv/user): %s", who, (int) c, wrapped );
+		imcb_log( ic, "Message from/to conversation %s@%p (unknown conv/user): %s", who, c, wrapped );
 	}
 	g_free( wrapped );
@@ -803,5 +803,5 @@
 	
 	if( set_getbool( &ic->irc->set, "debug" ) )
-		imcb_log( ic, "Creating new conversation: (id=0x%x,handle=%s)", (int) c, handle );
+		imcb_log( ic, "Creating new conversation: (id=%p,handle=%s)", c, handle );
 	
 	return c;
@@ -817,5 +817,5 @@
 	
 	if( set_getbool( &b->ic->irc->set, "debug" ) )
-		imcb_log( b->ic, "User %s added to conversation 0x%x", handle, (int) b );
+		imcb_log( b->ic, "User %s added to conversation %p", handle, b );
 	
 	/* It might be yourself! */
@@ -852,5 +852,5 @@
 	
 	if( set_getbool( &b->ic->irc->set, "debug" ) )
-		imcb_log( b->ic, "User %s removed from conversation 0x%x (%s)", handle, (int) b, reason ? reason : "" );
+		imcb_log( b->ic, "User %s removed from conversation %p (%s)", handle, b, reason ? reason : "" );
 	
 	/* It might be yourself! */
Index: root_commands.c
===================================================================
--- root_commands.c	(revision d75597b0b31f8aa8ca523a3cfa4869e20fca8466)
+++ root_commands.c	(revision 56f260affd91651cb0c44ee14713f7dfa0717ad4)
@@ -745,5 +745,5 @@
 static void cmd_set( irc_t *irc, char **cmd )
 {
-	char *set_name;
+	char *set_name = NULL;
 	
 	if( cmd[1] && cmd[2] )
@@ -765,5 +765,5 @@
 		}
 	}
-	if( cmd[1] ) /* else 'forgotten' on purpose.. Must show new value after changing */
+	if( set_name ) /* else 'forgotten' on purpose.. Must show new value after changing */
 	{
 		char *s = set_getstr( &irc->set, set_name );
Index: storage_xml.c
===================================================================
--- storage_xml.c	(revision d75597b0b31f8aa8ca523a3cfa4869e20fca8466)
+++ storage_xml.c	(revision 56f260affd91651cb0c44ee14713f7dfa0717ad4)
@@ -456,5 +456,5 @@
 		   return TRUE on write errors. Which means, if we found
 		   something, there was an error. :-) */
-		if( g_hash_table_find( acc->nicks, xml_save_nick, (gpointer) fd ) )
+		if( g_hash_table_find( acc->nicks, xml_save_nick, & fd ) )
 			goto write_error;
 		
@@ -494,5 +494,5 @@
 static gboolean xml_save_nick( gpointer key, gpointer value, gpointer data )
 {
-	return !xml_printf( (int) data, 2, "<buddy handle=\"%s\" nick=\"%s\" />\n", key, value );
+	return !xml_printf( *( (int*) data ), 2, "<buddy handle=\"%s\" nick=\"%s\" />\n", key, value );
 }
 
