Text  |   XML   |   Visible Warnings:

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

Categories: LANG.STRUCT.RC CWE:570 CWE:571
Warning ID: 214.28846
Procedure: enc_xdr_short
Trace: view
Modified: Thu Nov 26 11:28:14 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_short
 1333 enc_xdr_short(mp, vp, cnt, std, siz) 
 1334         struct pmsg *mp;
 1335         void *vp;
 1336         int cnt, std, siz;
 1337 {
 1338         register short *np;
 1339         int cc = 0;
 1340  
 1341         for (np = (short*)vp; cnt-- > 0; np += std)
 1342                 if (!xdr_short(&mp->m_xdr, np)) {
 1343                         mp->m_frag->fr_rlink->fr_len = xdr_getpos(&mp->m_xdr);
Never True: cc != 01344                         if (cc = enc_xdr_step(mp))     /* Redundant Condition */
 1345                                 break;   /* Unreachable Control Flow (ID: 215.28847) */
 1346                         else 
 1347                                 if (!xdr_short(&mp->m_xdr, np)) {
 1348                                         cc = PvmNoMem;
 1349                                         break;
 1350                                 }
 1351                 }
 1352         mp->m_frag->fr_rlink->fr_len = xdr_getpos(&mp->m_xdr);
 1353         return cc;
 1354 } 




Change Warning 214.28846 : Redundant Condition

Priority:
State:
Finding:
Owner:
Note: