Text  |   XML   |   Visible Warnings:

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

Categories: LANG.STRUCT.RC CWE:570 CWE:571
Warning ID: 222.28854
Procedure: enc_xdr_float
Trace: view
Modified: Thu Nov 26 11:28:15 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_float
 1474 enc_xdr_float(mp, vp, cnt, std, siz) 
 1475         struct pmsg *mp;
 1476         void *vp;
 1477         int cnt, std, siz;
 1478 {
 1479         register float *fp;
 1480         int cc = 0;
 1481  
 1482         for (fp = (float*)vp; cnt-- > 0; fp += std)
 1483                 if (!xdr_float(&mp->m_xdr, fp)) {
 1484                         mp->m_frag->fr_rlink->fr_len = xdr_getpos(&mp->m_xdr);
Never True: cc != 01485                         if (cc = enc_xdr_step(mp))     /* Redundant Condition */
 1486                                 break;   /* Unreachable Control Flow (ID: 223.28855) */
 1487                         else 
 1488                                 if (!xdr_float(&mp->m_xdr, fp)) {
 1489                                         cc = PvmNoMem;
 1490                                         break;
 1491                                 }
 1492                 }
 1493         mp->m_frag->fr_rlink->fr_len = xdr_getpos(&mp->m_xdr);
 1494         return cc;
 1495 } 




Change Warning 222.28854 : Redundant Condition

Priority:
State:
Finding:
Owner:
Note: