Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Redundant Condition  at pmsg.c:2064

Categories: LANG.STRUCT.RC CWE:570 CWE:571
Warning ID: 2648.2693
Procedure: enc_trc_hdr
Trace: View
Modified: Wed Sep 2 12:42:36 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     
ProblemLineSource
   /u1/paul/SATE/2010/c/pvm/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  
Never True: cc != 02064         if ( (cc = enc_xdr_init(mp)) )     /* Redundant Condition */
 2065                 return( cc );   /* Unreachable Data Flow (ID: 2649.2694) */
 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 = strlenpvmtevinfo[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 2648.2693 : Redundant Condition

Priority:
State:
Finding:
Owner:
Note: