Text  |   XML   |   Visible Warnings:

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

Categories: LANG.STRUCT.UC CWE:561
Warning ID: 229.28865
Similar Warnings: 229.28864
Procedure: enc_xdr_dcplx
Trace: view
Modified: Thu Nov 26 11:28:17 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_dcplx
1563 enc_xdr_dcplx(mp, vp, cnt, std, siz) 
1564         struct pmsg *mp;
1565         void *vp;
1566         int cnt, std, siz;
1567 {
1568         register double *zp;
1569         int cc = 0;
1570  
1571         std = std * 2 - 1;
1572         for (zp = (double*)vp; cnt-- > 0; zp += std) {
1573                 if (!xdr_double(&mp->m_xdr, zp)) {
1574                         if (cc = enc_xdr_step(mp))   /* Redundant Condition (ID: 228.28863) */
1575                                 break;   /* Unreachable Control Flow (ID: 229.28864) */
1576                         else 
1577                                 if (!xdr_double(&mp->m_xdr, zp)) {
1578                                         cc = PvmNoMem;
1579                                         break;
1580                                 }
1581                 }
1582                 mp->m_frag->fr_rlink->fr_len = xdr_getpos(&mp->m_xdr);
1583                 zp++;
1584                 if (!xdr_double(&mp->m_xdr, zp)) {
1585                         if (cc = enc_xdr_step(mp))   /* Redundant Condition (ID: 228.28862) */
1586                                 break;     /* Unreachable Control Flow */
1587                         else 
1588                                 if (!xdr_double(&mp->m_xdr, zp)) {
1589                                         cc = PvmNoMem;
1590                                         break;
1591                                 }
1592                 }
1593                 mp->m_frag->fr_rlink->fr_len = xdr_getpos(&mp->m_xdr);
1594         }
1595         return cc;
1596 } 




Change Warning 229.28865 : Unreachable Control Flow

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