Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Redundant Condition  at pmsg.c:1317

Categories: LANG.STRUCT.RC CWE:570 CWE:571
Warning ID: 212.28844
Procedure: enc_xdr_byte
Trace: view
Modified: Thu Nov 26 11:28:13 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
   /kat0/fletcher/SATE/2010/pvm3/src/pmsg.c
   Enter enc_xdr_byte
 1308 enc_xdr_byte(mp, vp, cnt, std, siz) 
 1309         struct pmsg *mp;
 1310         void *vp;
 1311         int cnt, std, siz;
 1312 {
 1313         struct frag *fp;
 1314         int cc;
 1315  
 1316         fp = mp->m_frag->fr_rlink;
Never True: cc != 01317         if (cc = bytepk(mp, (char*)vp, cnt, 1, std))     /* Redundant Condition */
 1318                 return cc;   /* Unreachable Data Flow (ID: 213.28845) */
 1319         if (fp != mp->m_frag->fr_rlink) {
 1320                 fp = mp->m_frag->fr_rlink;
 1321                 xdrmem_create(&mp->m_xdr,
 1322                                 fp->fr_dat,
 1323                                 (unsigned)(fp->fr_max - (fp->fr_dat - fp->fr_buf)),
 1324                                 XDR_ENCODE);
 1325         }
 1326         fp->fr_len = (fp->fr_len + 3) & ~3;
 1327         xdr_setpos(&mp->m_xdr, fp->fr_len);
 1328         return 0;
 1329 } 




Change Warning 212.28844 : Redundant Condition

Priority:
State:
Finding:
Owner:
Note: