Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Unreachable Call  at pvmcruft.c:777

Categories: LANG.STRUCT.UC CWE:561
Warning ID: 2651.2696
Procedure: pvmtmpnam
Trace: View
Modified: Wed Sep 2 12:42:37 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/pvmcruft.c
  Enter pvmtmpnam
744 char * 
745 pvmtmpnam(buf) 
746         char *buf;
747 {
748         static int f = 0;
749         static int n = 0;
750         static char scratch[255];
751  
752         char *pvmtmp;
753  
754         if (!buf)
755                 buf = scratch;
756  
757         pvmtmp = pvmgettmp();
758  
759 #ifndef WIN32 
760         sprintf(buf, "%s/pvmtmp%06d.%d", pvmtmp, getpid(), n);
761 #else 
762         sprintf(buf, "%s\\pvmtmp%06d.%d", pvmtmp, getpid(), n); 
763 #endif 
764  
765         /* Silly Hack to avoid stomping on pvmd's first pvmtmpnam()
766                 call to get it's socket file... :-) */ 
767         n = 1 + (f++ % 10000);
768  
769         /* Better Check for String Overflow... */ 
770         /* (Late Check is Better Than No Check... :-) */ 
771  
772         if ( strlenbuf ) >= PVMTMPNAMLEN ) {
773                 pvmlogperror("Whoa!  PVMTMPNAMLEN Overflow in pvmtmpnam()...");
774                 pvmlogprintf("<%s> = %d >= %d", buf, strlenbuf ),
775                                 PVMTMPNAMLEN);
776                 pvmbailout(0);
777                 exit(1);                /* the other meaning of bail out */     /* Unreachable Call */
778         }
779  
780         return buf;
781 




Change Warning 2651.2696 : Unreachable Call

Priority:
State:
Finding:
Owner:
Note: