Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Redundant Condition  at pmsg.c:1510

Categories: LANG.STRUCT.RC CWE:570 CWE:571
Warning ID: 2640.2680
Procedure: enc_xdr_double
Trace: View
Modified: Wed Sep 2 12:42:31 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
   /u1/paul/SATE/2010/c/pvm/pvm3/src/pmsg.c
   Enter enc_xdr_double
 1499 enc_xdr_double(mp, vp, cnt, std, siz) 
 1500         struct pmsg *mp;
 1501         void *vp;
 1502         int cnt, std, siz;
 1503 {
 1504         register double *dp;
 1505         int cc = 0;
 1506         int n;
 1507  
 1508         for (dp = (double*)vp; cnt-- > 0; dp += std) {
 1509                 if (!xdr_double(&mp->m_xdr, dp)) {
Never True: cc != 01510                         if (cc = enc_xdr_step(mp))     /* Redundant Condition */
 1511                                 break;   /* Unreachable Control Flow (ID: 2641.2681) */
 1512                         else 
 1513                                 if (!xdr_double(&mp->m_xdr, dp)) {
 1514                                         cc = PvmNoMem;
 1515                                         break;
 1516                                 }
 1517                 }
 1518                 mp->m_frag->fr_rlink->fr_len = xdr_getpos(&mp->m_xdr);
 1519         }
 1520         return cc;
 1521 




Change Warning 2640.2680 : Redundant Condition

Priority:
State:
Finding:
Owner:
Note: