Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Unreachable Data Flow  at pmsg.c:2065

Categories: LANG.STRUCT.UC CWE:561
Warning ID: 233.28870
Procedure: enc_trc_hdr
Trace: view
Modified: Thu Nov 26 11:28:19 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/pvm3/src/pmsg.c
  Enter enc_trc_hdr
2050 enc_trc_hdr(mp) 
2051         struct pmsg *mp;
2052 {
2053         struct timeval timestamp;
2054  
2055         int tsec, tusec;
2056         int tmp;
2057         int cc;
2058  
2059         gettimeofday( &timestamp, (struct timezone *) 0 );
2060  
2061         tsec = (int) timestamp.tv_sec;
2062         tusec = (int) timestamp.tv_usec;
2063  
2064         if ( (cc = enc_xdr_init(mp)) )   /* Redundant Condition (ID: 232.28869) */
2065                 return( cc );     /* Unreachable Data Flow */
2066  
2067         tmp = TEV_MARK_USER_EVENT_RECORD;
2068         if ((cc = enc_xdr_int(mp, (void *) &tmp, 1, 1, (int) sizeof(int))))
2069                 return( cc );
2070  
2071         tmp = TEV_USER_DEFINED;
2072         if ((cc = enc_xdr_int(mp, (void *) &tmp, 1, 1, (int) sizeof(int))))
2073                 return( cc );
2074  
2075         tmp = strlen( pvmtevinfo[TEV_USER_DEFINED].name ) + 1;
2076         if ((cc = enc_xdr_int(mp, (void *) &tmp, 1, 1, (int) sizeof(int))))
2077                 return( cc );
2078  
2079         if ((cc = enc_xdr_byte(mp,
2080                         (void *)(pvmtevinfo[TEV_USER_DEFINED].name), tmp, 1, 1)))
2081                 return( cc );
2082  
2083         if ((cc = enc_xdr_int(mp, (void *) &tsec, 1, 1,
2084                         (int) sizeof(int))))
2085                 return( cc );
2086         if ((cc = enc_xdr_int(mp, (void *) &tusec, 1, 1,
2087                         (int) sizeof(int))))
2088                 return( cc );
2089  
2090         return( 0 );
2091 } 




Change Warning 233.28870 : Unreachable Data Flow

Priority:
State:
Finding:
Owner:
Note: