Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Unreachable Computation  at fe-events.c:188

Categories: LANG.STRUCT.UC CWE:561
Warning ID: 7345.28440
Procedure: event_kill
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-events.c
  Enter event_kill
170 static void event_kill(IRC_SERVER_REC *server, const char *data,
171                        const char *nick, const char *addr) 
172 {
173         char *params, *path, *reason;
174  
175         g_return_if_fail(data != NULL);
176  
177         params = event_get_params(data, 2 | PARAM_FLAG_GETREST,
178                                   NULL, &path);
179         reason = strstr(path, " (");
180         if (reason == NULL || reason[strlen(reason)-1] != ')') {
181                 /* weird server, maybe it didn't give path */ 
182                 reason = path;
183                 path = "";
184         } else {
185                 /* reason inside (...) */ 
186                 *reason = '\0';
187                 reason += 2;
188                 reason[strlen(reason)-1] = '\0';     /* Unreachable Computation */
189         }
190  
191         if (addr != NULL) {
192                 printformat(server, NULL, MSGLEVEL_CRAP, IRCTXT_KILL,
193                             nick, addr, reason, path);
194         } else {
195                 printformat(server, NULL, MSGLEVEL_CRAP, IRCTXT_KILL_SERVER,
196                             nick, reason, path);
197         }
198  
199         g_free(params);
200 } 




Change Warning 7345.28440 : Unreachable Computation

Priority:
State:
Finding:
Owner:
Note: