Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Unused Value  at net-nonblock.c:245

Categories: LANG.STRUCT.UVAL CWE:563
Warning ID: 2126.2127
Procedure: simple_readpipe
Trace: View
Modified: Wed Sep 2 11:51:24 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
  /u1/paul/SATE/2010/c/irssi/irssi-0.8.14/src/core/net-nonblock.c
  Enter simple_readpipe
227 static void simple_readpipe(SIMPLE_THREAD_REC *rec, GIOChannel *pipe) 
228 {
229         RESOLVED_IP_REC iprec;
230         GIOChannel *handle;
231         IPADDR *ip;
232  
233         g_return_if_fail(rec != NULL);
234  
235         g_source_remove(rec->tag);
236  
237         net_gethostbyname_return(pipe, &iprec);
238         g_free_not_null(iprec.errorstr);
239  
240         g_io_channel_close(rec->pipes[0]);
241         g_io_channel_unref(rec->pipes[0]);
242         g_io_channel_close(rec->pipes[1]);
243         g_io_channel_unref(rec->pipes[1]);
244  
245         ip = iprec.ip4.family != 0 ? &iprec.ip4 : &iprec.ip6;     /* Unused Value */
246         handle = iprec.error == -1 ? NULL :   /* Redundant Condition (ID: 2124.2125) */
247                 net_connect_ip(ip, rec->port, rec->my_ip);   /* Unreachable Call (ID: 2125.2126) */
248  
249         g_free_not_null(rec->my_ip);
250  
251         if (handle == NULL) {
252                 /* failed */ 
253                 rec->func(NULL, rec->data);
254                 g_free(rec);
255                 return;
256         }
257  
258         rec->tag = g_input_add(handle, G_INPUT_READ | G_INPUT_WRITE,
259                                (GInputFunction) simple_init, rec);   /* Dangerous Function Cast (ID: 83.83) */
260 




Change Warning 2126.2127 : Unused Value

Priority:
State:
Finding:
Owner:
Note: