Index: conf.c
===================================================================
--- conf.c	(revision 5a348c3164f5f2d1a1f759c01e8bc7df2ad0dadb)
+++ conf.c	(revision 10a0abfb5322aafddb21dabb34e8b89eaf4a05e0)
@@ -95,5 +95,5 @@
 			conf->port = i;
 		}
-		else if( opt == 'p' )
+		else if( opt == 'P' )
 		{
 			g_free( conf->pidfile );
Index: ipc.c
===================================================================
--- ipc.c	(revision 5a348c3164f5f2d1a1f759c01e8bc7df2ad0dadb)
+++ ipc.c	(revision 10a0abfb5322aafddb21dabb34e8b89eaf4a05e0)
@@ -507,5 +507,5 @@
 	}
 
-	if (bind(serversock, &un_addr, sizeof(un_addr)) == -1) {
+	if (bind(serversock, (struct sockaddr *)&un_addr, sizeof(un_addr)) == -1) {
 		log_message( LOGLVL_WARNING, "Unable to bind UNIX socket to %s: %s", IPCSOCKET, strerror(errno) );
 		return 0;
@@ -571,4 +571,5 @@
 	ipc_to_children_str( "OPERMSG :New BitlBee master process started (version " BITLBEE_VERSION ")\r\n" );
 	
+	fclose( fp );
 	return 1;
 }
Index: irc.c
===================================================================
--- irc.c	(revision 5a348c3164f5f2d1a1f759c01e8bc7df2ad0dadb)
+++ irc.c	(revision 10a0abfb5322aafddb21dabb34e8b89eaf4a05e0)
@@ -557,5 +557,5 @@
 	
 	u = user_find( irc, irc->mynick );
-	if( u ) is_private = u->is_private;
+	is_private = u->is_private;
 	
 	va_start( params, format );
Index: protocols/jabber/xmlparse.c
===================================================================
--- protocols/jabber/xmlparse.c	(revision 5a348c3164f5f2d1a1f759c01e8bc7df2ad0dadb)
+++ protocols/jabber/xmlparse.c	(revision 10a0abfb5322aafddb21dabb34e8b89eaf4a05e0)
@@ -1461,5 +1461,5 @@
 s = protocolEncodingName;
 #endif
-    if ((ns ? XmlInitEncodingNS : XmlInitEncoding)(&initEncoding, &encoding, s))
+    if (ns ? XmlInitEncodingNS(&initEncoding, &encoding, s) : XmlInitEncoding(&initEncoding, &encoding, s))
         return XML_ERROR_NONE;
     return handleUnknownEncoding(parser, protocolEncodingName);
@@ -1475,6 +1475,5 @@
     int standalone = -1;
     if (!(ns
-            ? XmlParseXmlDeclNS
-            : XmlParseXmlDecl)(isGeneralTextEntity,
+            ? XmlParseXmlDeclNS(isGeneralTextEntity,
                                encoding,
                                s,
@@ -1484,5 +1483,14 @@
                                &encodingName,
                                &newEncoding,
-                               &standalone))
+                               &standalone)
+            : XmlParseXmlDecl(isGeneralTextEntity,
+                               encoding,
+                               s,
+                               next,
+                               &eventPtr,
+                               &version,
+                               &encodingName,
+                               &newEncoding,
+                               &standalone)))
         return XML_ERROR_SYNTAX;
     if (!isGeneralTextEntity && standalone == 1)
@@ -1537,9 +1545,12 @@
             }
             enc = (ns
-                   ? XmlInitUnknownEncodingNS
-                   : XmlInitUnknownEncoding)(unknownEncodingMem,
+                   ? XmlInitUnknownEncodingNS(unknownEncodingMem,
                                              info.map,
                                              info.convert,
-                                             info.data);
+                                             info.data)
+                   : XmlInitUnknownEncoding(unknownEncodingMem,
+                                             info.map,
+                                             info.convert,
+                                             info.data));
             if (enc) {
                 unknownEncodingData = info.data;
Index: protocols/nogaim.c
===================================================================
--- protocols/nogaim.c	(revision 5a348c3164f5f2d1a1f759c01e8bc7df2ad0dadb)
+++ protocols/nogaim.c	(revision 10a0abfb5322aafddb21dabb34e8b89eaf4a05e0)
@@ -612,5 +612,6 @@
 			return;
 		}
-		return;
+		/* Why did we have this here....
+		return; */
 	}
 	
Index: protocols/oscar/oscar_util.c
===================================================================
--- protocols/oscar/oscar_util.c	(revision 5a348c3164f5f2d1a1f759c01e8bc7df2ad0dadb)
+++ protocols/oscar/oscar_util.c	(revision 10a0abfb5322aafddb21dabb34e8b89eaf4a05e0)
@@ -109,5 +109,5 @@
 
 	curPtr = sn;
-	while ( (*curPtr) != (char) NULL) {
+	while ( (*curPtr) != (char) '\0') {
 		if ((*curPtr) != ' ')
 		i++;
@@ -140,5 +140,5 @@
 	curPtr1 = sn1;
 	curPtr2 = sn2;
-	while ( (*curPtr1 != (char) NULL) && (*curPtr2 != (char) NULL) ) {
+	while ( (*curPtr1 != (char) '\0') && (*curPtr2 != (char) '\0') ) {
 		if ( (*curPtr1 == ' ') || (*curPtr2 == ' ') ) {
 			if (*curPtr1 == ' ')
Index: protocols/oscar/service.c
===================================================================
--- protocols/oscar/service.c	(revision 5a348c3164f5f2d1a1f759c01e8bc7df2ad0dadb)
+++ protocols/oscar/service.c	(revision 10a0abfb5322aafddb21dabb34e8b89eaf4a05e0)
@@ -881,4 +881,5 @@
 #endif
 
+/* len can't be 0 here anyway...
 		} else if ((offset == 0x00001000) && (len == 0x00000000)) {
 
@@ -887,5 +888,5 @@
 			aimbs_put32(&fr->data, 0xe9800998);
 			aimbs_put32(&fr->data, 0xecf8427e);
-
+*/
 		} else
 			do_error_dialog(sess->aux_data, "WARNING: unknown hash request", "Gaim");
Index: set.c
===================================================================
--- set.c	(revision 5a348c3164f5f2d1a1f759c01e8bc7df2ad0dadb)
+++ set.c	(revision 10a0abfb5322aafddb21dabb34e8b89eaf4a05e0)
@@ -150,5 +150,9 @@
 	if( s )
 	{
-		t->next = s->next;
+		if( t )
+			t->next = s->next;
+		else
+			irc->set = s->next;
+		
 		g_free( s->key );
 		if( s->value ) g_free( s->value );
