repo: ngircd
action: commit
revision: 
path_from: 
revision_from: 258e39e89f494600cf142ba1fd768f2faa285dbf:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit 258e39e89f494600cf142ba1fd768f2faa285dbf
Author: Alexander Barton 
Date:   Mon Jun 16 13:07:50 2008 +0200

    Fix GCC warnings for possibly uninitialized variables in IRC_JOIN

    This patch fixes the following two warnings of GCC 4.2.4:

    irc-channel.c: In function "IRC_JOIN":
    irc-channel.c:185:
     warning: "lastkey" may be used uninitialized in this function
    irc-channel.c:185:
     warning: "lastchan" may be used uninitialized in this function

diff --git a/src/ngircd/irc-channel.c b/src/ngircd/irc-channel.c
index 203e32f4e2961835b7ba56aab6158f693873137e..
index ..030961f01381a0a6db7fffcbfdc9ca7770048b2e 100644
--- a/src/ngircd/irc-channel.c
+++ b/src/ngircd/irc-channel.c
@@ -182,7 +182,7 @@ join_send_topic(CLIENT *Client, CLIENT *target, CHANNEL *chan,
 GLOBAL bool
 IRC_JOIN( CLIENT *Client, REQUEST *Req )
 {
-	char *channame, *key = NULL, *flags, *lastkey, *lastchan;
+	char *channame, *key = NULL, *flags, *lastkey = NULL, *lastchan = NULL;
 	CLIENT *target;
 	CHANNEL *chan;

-----END OF PAGE-----