Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Unreachable Control Flow  at pmsg.c:1538

Categories: LANG.STRUCT.UC CWE:561
Warning ID: 227.28861
Similar Warnings: 227.28860
Procedure: enc_xdr_cplx
Trace: view
Modified: Thu Nov 26 11:28:16 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_xdr_cplx
1525 enc_xdr_cplx(mp, vp, cnt, std, siz) 
1526         struct pmsg *mp;
1527         void *vp;
1528         int cnt, std, siz;
1529 {
1530         register float *xp;
1531         int cc = 0;
1532  
1533         std = std * 2 - 1;
1534         for (xp = (float*)vp; cnt-- > 0; xp += std) {
1535                 if (!xdr_float(&mp->m_xdr, xp)) {
1536                         mp->m_frag->fr_rlink->fr_len = xdr_getpos(&mp->m_xdr);
1537                         if (cc = enc_xdr_step(mp))   /* Redundant Condition (ID: 226.28858) */
1538                                 break;     /* Unreachable Control Flow */
1539                         else 
1540                                 if (!xdr_float(&mp->m_xdr, xp)) {
1541                                         cc = PvmNoMem;
1542                                         break;
1543                                 }
1544                 }
1545                 xp++;
1546                 if (!xdr_float(&mp->m_xdr, xp)) {
1547                         mp->m_frag->fr_rlink->fr_len = xdr_getpos(&mp->m_xdr);
1548                         if (cc = enc_xdr_step(mp))   /* Redundant Condition (ID: 226.28859) */
1549                                 break;   /* Unreachable Control Flow (ID: 227.28860) */
1550                         else 
1551                                 if (!xdr_float(&mp->m_xdr, xp)) {
1552                                         cc = PvmNoMem;
1553                                         break;
1554                                 }
1555                 }
1556         }
1557         mp->m_frag->fr_rlink->fr_len = xdr_getpos(&mp->m_xdr);
1558         return cc;
1559 } 




Change Warning 227.28861 : Unreachable Control Flow

Because they are very similar, this warning shares annotations with warning 227.28860.
CodeSonar has selected warning 227.28860 to represent this group of similar warnings. In order to edit this group, you must edit warning 227.28860.