@@ -359,7 +359,6 @@ static inline bool find_word(const char *restrict word,
359
359
360
360
static inline int read_dictionary (const char * dictfile )
361
361
{
362
- char * ptr , * dict ;
363
362
struct stat buf ;
364
363
char buffer [4096 ];
365
364
const char * buffer_end = buffer + (sizeof (buffer )) - 1 ;
@@ -372,6 +371,7 @@ static inline int read_dictionary(const char *dictfile)
372
371
return -1 ;
373
372
}
374
373
374
+ const char * ptr , * dict ;
375
375
ptr = dict =
376
376
mmap (NULL , buf .st_size , PROT_READ , MAP_SHARED | MAP_POPULATE , fd , 0 );
377
377
if (dict == MAP_FAILED ) {
@@ -393,7 +393,7 @@ static inline int read_dictionary(const char *dictfile)
393
393
add_word (buffer , word_nodes , word_node_heap , & word_node_heap_next ,
394
394
WORD_NODES_HEAP_SIZE );
395
395
}
396
- munmap (dict , buf .st_size );
396
+ munmap (( void * ) dict , buf .st_size );
397
397
close (fd );
398
398
399
399
return 0 ;
@@ -656,19 +656,17 @@ static get_char_t parse_number(parser_t *restrict p,
656
656
657
657
/* Determine the integer format based on its prefix. */
658
658
if (LIKELY (ch == '0' )) {
659
- get_char_t nextch1 , nextch2 ;
660
-
661
659
token_append (t , ch );
662
660
663
- nextch1 = get_char (p );
661
+ get_char_t nextch1 = get_char (p );
664
662
665
663
if (nextch1 >= '0' && nextch1 <= '8' ) {
666
664
/* Treat as an octal value */
667
665
ch = nextch1 ;
668
666
isoct = true;
669
667
} else if (nextch1 == 'x' || nextch1 == 'X' ) {
670
668
/* Check for hexadecimal notation */
671
- nextch2 = get_char (p );
669
+ get_char_t nextch2 = get_char (p );
672
670
673
671
if (LIKELY (nextch2 != PARSER_EOF )) {
674
672
/* If not EOF, revert state and finish token */
0 commit comments