Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Unreachable Control Flow  at pmsg.c:1538

Categories: LANG.STRUCT.UC CWE:561
Warning ID: 2643.2684
Similar Warnings: 2643.2685
Procedure: enc_xdr_cplx
Trace: View
Modified: Wed Sep 2 12:42:33 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
  /u1/paul/SATE/2010/c/pvm/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: 2642.2682) */
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: 2642.2683) */
1549                                 break;   /* Unreachable Control Flow (ID: 2643.2685) */
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 2643.2684 : Unreachable Control Flow

Because they are very similar, this warning shares annotations with warning 2643.2685.

Priority:
State:
Finding:
Owner:
Note: