Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Unused Value  at pvmd.c:1438

Categories: LANG.STRUCT.UVAL CWE:563
Warning ID: 2695.2747
Procedure: reap
Trace: View
Modified: Wed Sep 2 12:43:40 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/pvmd.c
  Enter reap
1422 reap(sig) 
1423         int sig;
1424 {
1425         int pid;
1426         int es = 0;
1427  
1428 #ifndef WIN32 
1429  
1430 #ifndef NOWAIT3 
1431 #if defined(RUSAGE_SELF)
1432         struct rusage rus;
1433 #else 
1434         int rus;
1435 #endif 
1436 #endif 
1437  
1438         sig = sig;     /* Unused Value */
1439  
1440 #ifdef  NOWAIT3 
1441 #ifdef  NOWAITPID 
1442         if ((pid = wait(&es)) > 0) 
1443 #else 
1444 #ifdef IMA_BEOSCYLD 
1445         if ((pid = waitpid(-1, &es, WNOHANG)) > 0) 
1446 #else 
1447         while ((pid = waitpid(-1, &es, WNOHANG)) > 0)
1448 #endif 
1449 #endif 
1450 #else   /*NOWAIT3*/ 
1451         while ((pid = wait3(&es, WNOHANG, &rus)) > 0) 
1452 #endif  /*NOWAIT3*/ 
1453  
1454         {
1455 #if !defined(NOWAIT3) && defined(RUSAGE_SELF) 
1456                 deads[wdead].dd_ut = rus.ru_utime;
1457                 deads[wdead].dd_st = rus.ru_stime; 
1458 #else 
1459                 deads[wdead].dd_ut.tv_sec = 0;
1460                 deads[wdead].dd_ut.tv_usec = 0;
1461                 deads[wdead].dd_st.tv_sec = 0;
1462                 deads[wdead].dd_st.tv_usec = 0;
1463 #endif 
1464                 deads[wdead].dd_pid = pid;
1465                 deads[wdead].dd_es = es;
1466                 if (++wdead >= ndead)
1467                         wdead = 0;
1468         }
1469  
1470 #ifdef  SYSVSIGNAL 
1471 #ifndef IMA_BEOSCYLD 
1472         (void)signal(SIGCLD, reap);
1473 #endif 
1474 #endif 
1475  
1476 #endif 
1477  
1478 




Change Warning 2695.2747 : Unused Value

Priority:
State:
Finding:
Owner:
Note: