Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Negative Character Value  at pvmcruft.c:672

Categories: MISC.NEGCHAR CWE:119 CWE:686
Warning ID: 8.28582
Similar Warnings: 8.28581
Procedure: pvmstrtoi
Trace: view
Modified: Thu Nov 26 11:26:13 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
   /kat0/fletcher/SATE/2010/pvm3/src/pvmcruft.c
   Enter pvmstrtoi
 662         char *p;
 663 {
 664         int i = 0;
 665         char c;
 666  
 667         if (*p == '0') {
 668                 p++;
 669                 if (*p == 'x' || *p == 'X')
 670                         while (isxdigit(c = *++p))   /* Negative Character Value (ID: 7.28580) */
 671                                 i = (i << 4) + c 
Type is char or signed char672                                                 - (isdigit(c) ? '0' : (isupper(c) ? 'A' : 'a') - 10);     /* Negative Character Value */
 673                 else 
 674                         while (c = *p++, c >= '0' && c <= '7')
 675                                 i = (i << 3) + c - '0';
 676                 return i;
 677         } else 
 678                 return (int)atoi(p);
 679 } 
 680  
 681  
 682 #ifndef I860_NODE 




Change Warning 8.28582 : Negative Character Value

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