Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Useless Assignment  at fe-irc-messages.c:55

Categories: LANG.STRUCT.UA
Warning ID: 7344.28439
Procedure: skip_target
Trace: view
Modified: Thu Nov 26 11:09:42 2009   show details
 
Priority: None
State: None
Finding: None
Owner: None
  edit properties

Legend [ X ]
Warning Location
Contributes
Parse Error
Other Warning
Two or More Loop Iterations
On Execution Path
Comment
Macro
Preprocessor
Include
Keyword
Preprocessed Away

Source  |  Language: C Hide Legend     
LineSource
  /kat0/fletcher/SATE/2010/irssi-0.8.14/src/fe-common/irc/fe-irc-messages.c
  Enter skip_target
40 static const char *skip_target(IRC_SERVER_REC *server, const char *target) 
41 {
42         int i = 0;
43         const char *val, *chars;
44  
45         /* Quick check */ 
46         if (server == NULL || server->prefix[(int)(unsigned char)*target] == 0)
47                 return target;
48  
49         /* Hack: for bahamut 1.4 which sends neither STATUSMSG nor 
50          * WALLCHOPS in 005, accept @#chan and @+#chan (but not +#chan) */ 
51         val = g_hash_table_lookup(server->isupport, "STATUSMSG");
52         if (val == NULL && *target != '@')
53                 return target;
54         chars = val ? val : "@+";
55         for(i = 0; target[i] != '\0'; i++) {     /* Useless Assignment */
56                 if (strchr(chars, target[i]) == NULL)
57                         break;
58         };
59  
60         if(ischannel(target[i]))
61                 target += i;
62  
63         return target;
64 } 




Change Warning 7344.28439 : Useless Assignment

Priority:
State:
Finding:
Owner:
Note: