Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'hostprogs-wmissing-prototypes' of git://git.kernel.org/pub/scm/linux/kernel/git/josh/linux-misc

* 'hostprogs-wmissing-prototypes' of git://git.kernel.org/pub/scm/linux/kernel/git/josh/linux-misc:
Makefile: Add -Wmising-prototypes to HOSTCFLAGS
oss: Mark loadhex static in hex2hex.c
dtc: Mark various internal functions static
dtc: Set "noinput" in the lexer to avoid an unused function
drm: radeon: Mark several functions static in mkregtable
arch/sparc/boot/*.c: Mark various internal functions static
arch/powerpc/boot/addRamDisk.c: Mark several internal functions static
arch/alpha/boot/tools/objstrip.c: Mark "usage" static
Documentation/vm/page-types.c: Declare checked_open static
genksyms: Mark is_reserved_word static
kconfig: Mark various internal functions static
kconfig: Make zconf.y work with current bison

+357 -328
+1 -1
Documentation/vm/page-types.c
··· 218 218 exit(EXIT_FAILURE); 219 219 } 220 220 221 - int checked_open(const char *pathname, int flags) 221 + static int checked_open(const char *pathname, int flags) 222 222 { 223 223 int fd = open(pathname, flags); 224 224
+1 -1
Makefile
··· 221 221 222 222 HOSTCC = gcc 223 223 HOSTCXX = g++ 224 - HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer 224 + HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer 225 225 HOSTCXXFLAGS = -O2 226 226 227 227 # Decide whether to build built-in, modular, or both.
+1 -1
arch/alpha/boot/tools/objstrip.c
··· 35 35 const char * prog_name; 36 36 37 37 38 - void 38 + static void 39 39 usage (void) 40 40 { 41 41 fprintf(stderr,
+3 -3
arch/powerpc/boot/addRamDisk.c
··· 58 58 59 59 return 64; 60 60 } 61 - void get4k(FILE *file, char *buf ) 61 + static void get4k(FILE *file, char *buf ) 62 62 { 63 63 unsigned j; 64 64 unsigned num = fread(buf, 1, 4096, file); ··· 66 66 buf[j] = 0; 67 67 } 68 68 69 - void put4k(FILE *file, char *buf ) 69 + static void put4k(FILE *file, char *buf ) 70 70 { 71 71 fwrite(buf, 1, 4096, file); 72 72 } 73 73 74 - void death(const char *msg, FILE *fdesc, const char *fname) 74 + static void death(const char *msg, FILE *fdesc, const char *fname) 75 75 { 76 76 fprintf(stderr, msg); 77 77 fclose(fdesc);
+4 -4
arch/sparc/boot/btfixupprep.c
··· 61 61 unsigned long lastfrelno; 62 62 btfixup *lastf; 63 63 64 - void fatal(void) __attribute__((noreturn)); 65 - void fatal(void) 64 + static void fatal(void) __attribute__((noreturn)); 65 + static void fatal(void) 66 66 { 67 67 fprintf(stderr, "Malformed output from objdump\n%s\n", buffer); 68 68 exit(1); 69 69 } 70 70 71 - btfixup *find(int type, char *name) 71 + static btfixup *find(int type, char *name) 72 72 { 73 73 int i; 74 74 for (i = 0; i < last; i++) { ··· 88 88 return array + last - 1; 89 89 } 90 90 91 - void set_mode (char *buffer) 91 + static void set_mode (char *buffer) 92 92 { 93 93 for (mode = 0;; mode++) 94 94 if (buffer[mode] < '0' || buffer[mode] > '9')
+5 -5
arch/sparc/boot/piggyback_32.c
··· 35 35 * as PROM looks for a.out image only. 36 36 */ 37 37 38 - unsigned short ld2(char *p) 38 + static unsigned short ld2(char *p) 39 39 { 40 40 return (p[0] << 8) | p[1]; 41 41 } 42 42 43 - unsigned int ld4(char *p) 43 + static unsigned int ld4(char *p) 44 44 { 45 45 return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]; 46 46 } 47 47 48 - void st4(char *p, unsigned int x) 48 + static void st4(char *p, unsigned int x) 49 49 { 50 50 p[0] = x >> 24; 51 51 p[1] = x >> 16; ··· 53 53 p[3] = x; 54 54 } 55 55 56 - void usage(void) 56 + static void usage(void) 57 57 { 58 58 /* fs_img.gz is an image of initial ramdisk. */ 59 59 fprintf(stderr, "Usage: piggyback vmlinux.aout System.map fs_img.gz\n"); ··· 61 61 exit(1); 62 62 } 63 63 64 - void die(char *str) 64 + static void die(char *str) 65 65 { 66 66 perror (str); 67 67 exit(1);
+1 -1
arch/sparc/boot/piggyback_64.c
··· 32 32 /* Note: run this on an a.out kernel (use elftoaout for it), as PROM looks for a.out image onlly 33 33 usage: piggyback vmlinux System.map tail, where tail is gzipped fs of the initial ramdisk */ 34 34 35 - void die(char *str) 35 + static void die(char *str) 36 36 { 37 37 perror (str); 38 38 exit(1);
+6 -6
drivers/gpu/drm/radeon/mkregtable.c
··· 561 561 char *gpu_prefix; 562 562 }; 563 563 564 - struct offset *offset_new(unsigned o) 564 + static struct offset *offset_new(unsigned o) 565 565 { 566 566 struct offset *offset; 567 567 ··· 573 573 return offset; 574 574 } 575 575 576 - void table_offset_add(struct table *t, struct offset *offset) 576 + static void table_offset_add(struct table *t, struct offset *offset) 577 577 { 578 578 list_add_tail(&offset->list, &t->offsets); 579 579 } 580 580 581 - void table_init(struct table *t) 581 + static void table_init(struct table *t) 582 582 { 583 583 INIT_LIST_HEAD(&t->offsets); 584 584 t->offset_max = 0; ··· 586 586 t->table = NULL; 587 587 } 588 588 589 - void table_print(struct table *t) 589 + static void table_print(struct table *t) 590 590 { 591 591 unsigned nlloop, i, j, n, c, id; 592 592 ··· 611 611 printf("};\n"); 612 612 } 613 613 614 - int table_build(struct table *t) 614 + static int table_build(struct table *t) 615 615 { 616 616 struct offset *offset; 617 617 unsigned i, m; ··· 631 631 } 632 632 633 633 static char gpu_name[10]; 634 - int parser_auth(struct table *t, const char *filename) 634 + static int parser_auth(struct table *t, const char *filename) 635 635 { 636 636 FILE *file; 637 637 regex_t mask_rex;
+1 -1
scripts/dtc/data.c
··· 217 217 return d; 218 218 } 219 219 220 - struct data data_append_markers(struct data d, struct marker *m) 220 + static struct data data_append_markers(struct data d, struct marker *m) 221 221 { 222 222 struct marker **mp = &d.markers; 223 223
+1 -1
scripts/dtc/dtc-lexer.l
··· 18 18 * USA 19 19 */ 20 20 21 - %option noyywrap nounput yylineno 21 + %option noyywrap noinput nounput yylineno 22 22 23 23 %x INCLUDE 24 24 %x BYTESTRING
+53 -16
scripts/dtc/dtc-lexer.lex.c_shipped
··· 9 9 #define FLEX_SCANNER 10 10 #define YY_FLEX_MAJOR_VERSION 2 11 11 #define YY_FLEX_MINOR_VERSION 5 12 - #define YY_FLEX_SUBMINOR_VERSION 34 12 + #define YY_FLEX_SUBMINOR_VERSION 35 13 13 #if YY_FLEX_SUBMINOR_VERSION > 0 14 14 #define FLEX_BETA 15 15 #endif ··· 54 54 typedef unsigned char flex_uint8_t; 55 55 typedef unsigned short int flex_uint16_t; 56 56 typedef unsigned int flex_uint32_t; 57 - #endif /* ! C99 */ 58 57 59 58 /* Limits of integral types. */ 60 59 #ifndef INT8_MIN ··· 83 84 #ifndef UINT32_MAX 84 85 #define UINT32_MAX (4294967295U) 85 86 #endif 87 + 88 + #endif /* ! C99 */ 86 89 87 90 #endif /* ! FLEXINT_H */ 88 91 ··· 142 141 143 142 /* Size of default input buffer. */ 144 143 #ifndef YY_BUF_SIZE 144 + #ifdef __ia64__ 145 + /* On IA-64, the buffer size is 16k, not 8k. 146 + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. 147 + * Ditto for the __ia64__ case accordingly. 148 + */ 149 + #define YY_BUF_SIZE 32768 150 + #else 145 151 #define YY_BUF_SIZE 16384 152 + #endif /* __ia64__ */ 146 153 #endif 147 154 148 155 /* The state buf must be large enough to hold one state per character in the main buffer. ··· 200 191 while ( 0 ) 201 192 202 193 #define unput(c) yyunput( c, (yytext_ptr) ) 203 - 204 - /* The following is because we cannot portably get our hands on size_t 205 - * (without autoconf's help, which isn't available because we want 206 - * flex-generated scanners to compile on their own). 207 - * Given that the standard has decreed that size_t exists since 1989, 208 - * I guess we can afford to depend on it. Manoj. 209 - */ 210 194 211 195 #ifndef YY_TYPEDEF_YY_SIZE_T 212 196 #define YY_TYPEDEF_YY_SIZE_T ··· 606 604 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 607 605 * USA 608 606 */ 607 + #define YY_NO_INPUT 1 609 608 610 609 611 610 ··· 637 634 638 635 static void push_input_file(const char *filename); 639 636 static int pop_input_file(void); 640 - #line 638 "dtc-lexer.lex.c" 637 + #line 641 "dtc-lexer.lex.c" 641 638 642 639 #define INITIAL 0 643 640 #define INCLUDE 1 ··· 658 655 #endif 659 656 660 657 static int yy_init_globals (void ); 658 + 659 + /* Accessor methods to globals. 660 + These are made visible to non-reentrant scanners for convenience. */ 661 + 662 + int yylex_destroy (void ); 663 + 664 + int yyget_debug (void ); 665 + 666 + void yyset_debug (int debug_flag ); 667 + 668 + YY_EXTRA_TYPE yyget_extra (void ); 669 + 670 + void yyset_extra (YY_EXTRA_TYPE user_defined ); 671 + 672 + FILE *yyget_in (void ); 673 + 674 + void yyset_in (FILE * in_str ); 675 + 676 + FILE *yyget_out (void ); 677 + 678 + void yyset_out (FILE * out_str ); 679 + 680 + int yyget_leng (void ); 681 + 682 + char *yyget_text (void ); 683 + 684 + int yyget_lineno (void ); 685 + 686 + void yyset_lineno (int line_number ); 661 687 662 688 /* Macros after this point can all be overridden by user definitions in 663 689 * section 1. ··· 720 688 721 689 /* Amount of stuff to slurp up with each read. */ 722 690 #ifndef YY_READ_BUF_SIZE 691 + #ifdef __ia64__ 692 + /* On IA-64, the buffer size is 16k, not 8k */ 693 + #define YY_READ_BUF_SIZE 16384 694 + #else 723 695 #define YY_READ_BUF_SIZE 8192 696 + #endif /* __ia64__ */ 724 697 #endif 725 698 726 699 /* Copy whatever the last rule matched to the standard output. */ ··· 733 696 /* This used to be an fputs(), but since the string might contain NUL's, 734 697 * we now use fwrite(). 735 698 */ 736 - #define ECHO fwrite( yytext, yyleng, 1, yyout ) 699 + #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) 737 700 #endif 738 701 739 702 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, ··· 744 707 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 745 708 { \ 746 709 int c = '*'; \ 747 - int n; \ 710 + size_t n; \ 748 711 for ( n = 0; n < max_size && \ 749 712 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 750 713 buf[n] = (char) c; \ ··· 828 791 829 792 #line 64 "dtc-lexer.l" 830 793 831 - #line 795 "dtc-lexer.lex.c" 794 + #line 832 "dtc-lexer.lex.c" 832 795 833 796 if ( !(yy_init) ) 834 797 { ··· 1153 1116 #line 222 "dtc-lexer.l" 1154 1117 ECHO; 1155 1118 YY_BREAK 1156 - #line 1120 "dtc-lexer.lex.c" 1119 + #line 1157 "dtc-lexer.lex.c" 1157 1120 1158 1121 case YY_END_OF_BUFFER: 1159 1122 { ··· 1877 1840 1878 1841 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will 1879 1842 * scan from a @e copy of @a bytes. 1880 - * @param bytes the byte buffer to scan 1881 - * @param len the number of bytes in the buffer pointed to by @a bytes. 1843 + * @param yybytes the byte buffer to scan 1844 + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. 1882 1845 * 1883 1846 * @return the newly allocated buffer state object. 1884 1847 */
+1 -1
scripts/dtc/libfdt/fdt_ro.c
··· 411 411 &phandle, sizeof(phandle)); 412 412 } 413 413 414 - int _stringlist_contains(const char *strlist, int listlen, const char *str) 414 + static int _stringlist_contains(const char *strlist, int listlen, const char *str) 415 415 { 416 416 int len = strlen(str); 417 417 const char *p;
+1 -1
scripts/dtc/treesource.c
··· 52 52 fputc('\t', f); 53 53 } 54 54 55 - int isstring(char c) 55 + static int isstring(char c) 56 56 { 57 57 return (isprint(c) 58 58 || (c == '\0')
+51 -46
scripts/genksyms/keywords.c_shipped
··· 1 - /* ANSI-C code produced by gperf version 3.0.2 */ 1 + /* ANSI-C code produced by gperf version 3.0.3 */ 2 2 /* Command-line: gperf -L ANSI-C -a -C -E -g -H is_reserved_hash -k '1,3,$' -N is_reserved_word -p -t scripts/genksyms/keywords.gperf */ 3 3 4 4 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ ··· 30 30 31 31 #line 1 "scripts/genksyms/keywords.gperf" 32 32 33 - #line 3 "scripts/genksyms/keywords.gperf" 33 + struct resword; 34 + static const struct resword *is_reserved_word(register const char *str, register unsigned int len); 35 + #line 5 "scripts/genksyms/keywords.gperf" 34 36 struct resword { const char *name; int token; }; 35 37 /* maximum key range = 62, duplicates = 0 */ 36 38 ··· 80 78 81 79 #ifdef __GNUC__ 82 80 __inline 81 + #ifdef __GNUC_STDC_INLINE__ 82 + __attribute__ ((__gnu_inline__)) 83 + #endif 83 84 #endif 84 85 const struct resword * 85 86 is_reserved_word (register const char *str, register unsigned int len) ··· 99 94 static const struct resword wordlist[] = 100 95 { 101 96 {""}, {""}, {""}, 102 - #line 26 "scripts/genksyms/keywords.gperf" 97 + #line 28 "scripts/genksyms/keywords.gperf" 103 98 {"asm", ASM_KEYW}, 104 99 {""}, 105 - #line 8 "scripts/genksyms/keywords.gperf" 100 + #line 10 "scripts/genksyms/keywords.gperf" 106 101 {"__asm", ASM_KEYW}, 107 102 {""}, 108 - #line 9 "scripts/genksyms/keywords.gperf" 103 + #line 11 "scripts/genksyms/keywords.gperf" 109 104 {"__asm__", ASM_KEYW}, 110 105 {""}, {""}, 111 - #line 52 "scripts/genksyms/keywords.gperf" 106 + #line 54 "scripts/genksyms/keywords.gperf" 112 107 {"__typeof__", TYPEOF_KEYW}, 113 108 {""}, 114 - #line 12 "scripts/genksyms/keywords.gperf" 109 + #line 14 "scripts/genksyms/keywords.gperf" 115 110 {"__const", CONST_KEYW}, 116 - #line 11 "scripts/genksyms/keywords.gperf" 117 - {"__attribute__", ATTRIBUTE_KEYW}, 118 111 #line 13 "scripts/genksyms/keywords.gperf" 112 + {"__attribute__", ATTRIBUTE_KEYW}, 113 + #line 15 "scripts/genksyms/keywords.gperf" 119 114 {"__const__", CONST_KEYW}, 120 - #line 18 "scripts/genksyms/keywords.gperf" 121 - {"__signed__", SIGNED_KEYW}, 122 - #line 44 "scripts/genksyms/keywords.gperf" 123 - {"static", STATIC_KEYW}, 124 115 #line 20 "scripts/genksyms/keywords.gperf" 116 + {"__signed__", SIGNED_KEYW}, 117 + #line 46 "scripts/genksyms/keywords.gperf" 118 + {"static", STATIC_KEYW}, 119 + #line 22 "scripts/genksyms/keywords.gperf" 125 120 {"__volatile__", VOLATILE_KEYW}, 126 - #line 39 "scripts/genksyms/keywords.gperf" 121 + #line 41 "scripts/genksyms/keywords.gperf" 127 122 {"int", INT_KEYW}, 128 - #line 32 "scripts/genksyms/keywords.gperf" 123 + #line 34 "scripts/genksyms/keywords.gperf" 129 124 {"char", CHAR_KEYW}, 130 - #line 33 "scripts/genksyms/keywords.gperf" 125 + #line 35 "scripts/genksyms/keywords.gperf" 131 126 {"const", CONST_KEYW}, 132 - #line 45 "scripts/genksyms/keywords.gperf" 127 + #line 47 "scripts/genksyms/keywords.gperf" 133 128 {"struct", STRUCT_KEYW}, 134 - #line 24 "scripts/genksyms/keywords.gperf" 129 + #line 26 "scripts/genksyms/keywords.gperf" 135 130 {"__restrict__", RESTRICT_KEYW}, 136 - #line 25 "scripts/genksyms/keywords.gperf" 131 + #line 27 "scripts/genksyms/keywords.gperf" 137 132 {"restrict", RESTRICT_KEYW}, 138 - #line 23 "scripts/genksyms/keywords.gperf" 133 + #line 25 "scripts/genksyms/keywords.gperf" 139 134 {"_restrict", RESTRICT_KEYW}, 140 - #line 16 "scripts/genksyms/keywords.gperf" 135 + #line 18 "scripts/genksyms/keywords.gperf" 141 136 {"__inline__", INLINE_KEYW}, 142 - #line 10 "scripts/genksyms/keywords.gperf" 137 + #line 12 "scripts/genksyms/keywords.gperf" 143 138 {"__attribute", ATTRIBUTE_KEYW}, 144 139 {""}, 145 - #line 14 "scripts/genksyms/keywords.gperf" 140 + #line 16 "scripts/genksyms/keywords.gperf" 146 141 {"__extension__", EXTENSION_KEYW}, 147 - #line 35 "scripts/genksyms/keywords.gperf" 142 + #line 37 "scripts/genksyms/keywords.gperf" 148 143 {"enum", ENUM_KEYW}, 149 - #line 19 "scripts/genksyms/keywords.gperf" 144 + #line 21 "scripts/genksyms/keywords.gperf" 150 145 {"__volatile", VOLATILE_KEYW}, 151 - #line 36 "scripts/genksyms/keywords.gperf" 146 + #line 38 "scripts/genksyms/keywords.gperf" 152 147 {"extern", EXTERN_KEYW}, 153 148 {""}, 154 - #line 17 "scripts/genksyms/keywords.gperf" 149 + #line 19 "scripts/genksyms/keywords.gperf" 155 150 {"__signed", SIGNED_KEYW}, 156 - #line 7 "scripts/genksyms/keywords.gperf" 151 + #line 9 "scripts/genksyms/keywords.gperf" 157 152 {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW}, 158 153 {""}, 159 - #line 51 "scripts/genksyms/keywords.gperf" 154 + #line 53 "scripts/genksyms/keywords.gperf" 160 155 {"typeof", TYPEOF_KEYW}, 161 - #line 46 "scripts/genksyms/keywords.gperf" 156 + #line 48 "scripts/genksyms/keywords.gperf" 162 157 {"typedef", TYPEDEF_KEYW}, 163 - #line 15 "scripts/genksyms/keywords.gperf" 158 + #line 17 "scripts/genksyms/keywords.gperf" 164 159 {"__inline", INLINE_KEYW}, 165 - #line 31 "scripts/genksyms/keywords.gperf" 160 + #line 33 "scripts/genksyms/keywords.gperf" 166 161 {"auto", AUTO_KEYW}, 167 - #line 47 "scripts/genksyms/keywords.gperf" 162 + #line 49 "scripts/genksyms/keywords.gperf" 168 163 {"union", UNION_KEYW}, 169 164 {""}, {""}, 170 - #line 48 "scripts/genksyms/keywords.gperf" 165 + #line 50 "scripts/genksyms/keywords.gperf" 171 166 {"unsigned", UNSIGNED_KEYW}, 172 - #line 49 "scripts/genksyms/keywords.gperf" 167 + #line 51 "scripts/genksyms/keywords.gperf" 173 168 {"void", VOID_KEYW}, 174 - #line 42 "scripts/genksyms/keywords.gperf" 169 + #line 44 "scripts/genksyms/keywords.gperf" 175 170 {"short", SHORT_KEYW}, 176 171 {""}, {""}, 177 - #line 50 "scripts/genksyms/keywords.gperf" 172 + #line 52 "scripts/genksyms/keywords.gperf" 178 173 {"volatile", VOLATILE_KEYW}, 179 174 {""}, 180 - #line 37 "scripts/genksyms/keywords.gperf" 175 + #line 39 "scripts/genksyms/keywords.gperf" 181 176 {"float", FLOAT_KEYW}, 182 - #line 34 "scripts/genksyms/keywords.gperf" 177 + #line 36 "scripts/genksyms/keywords.gperf" 183 178 {"double", DOUBLE_KEYW}, 184 179 {""}, 185 - #line 5 "scripts/genksyms/keywords.gperf" 180 + #line 7 "scripts/genksyms/keywords.gperf" 186 181 {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW}, 187 182 {""}, {""}, 188 - #line 38 "scripts/genksyms/keywords.gperf" 183 + #line 40 "scripts/genksyms/keywords.gperf" 189 184 {"inline", INLINE_KEYW}, 190 - #line 6 "scripts/genksyms/keywords.gperf" 185 + #line 8 "scripts/genksyms/keywords.gperf" 191 186 {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, 192 - #line 41 "scripts/genksyms/keywords.gperf" 187 + #line 43 "scripts/genksyms/keywords.gperf" 193 188 {"register", REGISTER_KEYW}, 194 189 {""}, 195 - #line 22 "scripts/genksyms/keywords.gperf" 190 + #line 24 "scripts/genksyms/keywords.gperf" 196 191 {"_Bool", BOOL_KEYW}, 197 - #line 43 "scripts/genksyms/keywords.gperf" 192 + #line 45 "scripts/genksyms/keywords.gperf" 198 193 {"signed", SIGNED_KEYW}, 199 194 {""}, {""}, 200 - #line 40 "scripts/genksyms/keywords.gperf" 195 + #line 42 "scripts/genksyms/keywords.gperf" 201 196 {"long", LONG_KEYW} 202 197 }; 203 198
+2
scripts/genksyms/keywords.gperf
··· 1 1 %{ 2 + struct resword; 3 + static const struct resword *is_reserved_word(register const char *str, register unsigned int len); 2 4 %} 3 5 struct resword { const char *name; int token; } 4 6 %%
+19 -6
scripts/kconfig/lex.zconf.c_shipped
··· 160 160 161 161 /* Size of default input buffer. */ 162 162 #ifndef YY_BUF_SIZE 163 + #ifdef __ia64__ 164 + /* On IA-64, the buffer size is 16k, not 8k. 165 + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. 166 + * Ditto for the __ia64__ case accordingly. 167 + */ 168 + #define YY_BUF_SIZE 32768 169 + #else 163 170 #define YY_BUF_SIZE 16384 171 + #endif /* __ia64__ */ 164 172 #endif 165 173 166 174 /* The state buf must be large enough to hold one state per character in the main buffer. ··· 810 802 static void zconf_endhelp(void); 811 803 static void zconf_endfile(void); 812 804 813 - void new_string(void) 805 + static void new_string(void) 814 806 { 815 807 text = malloc(START_STRSIZE); 816 808 text_asize = START_STRSIZE; ··· 818 810 *text = 0; 819 811 } 820 812 821 - void append_string(const char *str, int size) 813 + static void append_string(const char *str, int size) 822 814 { 823 815 int new_size = text_size + size + 1; 824 816 if (new_size > text_asize) { ··· 832 824 text[text_size] = 0; 833 825 } 834 826 835 - void alloc_string(const char *str, int size) 827 + static void alloc_string(const char *str, int size) 836 828 { 837 829 text = malloc(size + 1); 838 830 memcpy(text, str, size); ··· 922 914 923 915 /* Amount of stuff to slurp up with each read. */ 924 916 #ifndef YY_READ_BUF_SIZE 917 + #ifdef __ia64__ 918 + /* On IA-64, the buffer size is 16k, not 8k */ 919 + #define YY_READ_BUF_SIZE 16384 920 + #else 925 921 #define YY_READ_BUF_SIZE 8192 922 + #endif /* __ia64__ */ 926 923 #endif 927 924 928 925 /* Copy whatever the last rule matched to the standard output. */ ··· 935 922 /* This used to be an fputs(), but since the string might contain NUL's, 936 923 * we now use fwrite(). 937 924 */ 938 - #define ECHO fwrite( zconftext, zconfleng, 1, zconfout ) 925 + #define ECHO do { if (fwrite( zconftext, zconfleng, 1, zconfout )) {} } while (0) 939 926 #endif 940 927 941 928 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, ··· 2073 2060 2074 2061 /** Setup the input buffer state to scan the given bytes. The next call to zconflex() will 2075 2062 * scan from a @e copy of @a bytes. 2076 - * @param bytes the byte buffer to scan 2077 - * @param len the number of bytes in the buffer pointed to by @a bytes. 2063 + * @param yybytes the byte buffer to scan 2064 + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. 2078 2065 * 2079 2066 * @return the newly allocated buffer state object. 2080 2067 */
+2
scripts/kconfig/zconf.gperf
··· 9 9 10 10 struct kconf_id; 11 11 12 + static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); 13 + 12 14 %% 13 15 mainmenu, T_MAINMENU, TF_COMMAND 14 16 menu, T_MENU, TF_COMMAND
+2
scripts/kconfig/zconf.hash.c_shipped
··· 30 30 #endif 31 31 32 32 struct kconf_id; 33 + 34 + static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); 33 35 /* maximum key range = 47, duplicates = 0 */ 34 36 35 37 #ifdef __GNUC__
+3 -3
scripts/kconfig/zconf.l
··· 39 39 static void zconf_endhelp(void); 40 40 static void zconf_endfile(void); 41 41 42 - void new_string(void) 42 + static void new_string(void) 43 43 { 44 44 text = malloc(START_STRSIZE); 45 45 text_asize = START_STRSIZE; ··· 47 47 *text = 0; 48 48 } 49 49 50 - void append_string(const char *str, int size) 50 + static void append_string(const char *str, int size) 51 51 { 52 52 int new_size = text_size + size + 1; 53 53 if (new_size > text_asize) { ··· 61 61 text[text_size] = 0; 62 62 } 63 63 64 - void alloc_string(const char *str, int size) 64 + static void alloc_string(const char *str, int size) 65 65 { 66 66 text = malloc(size + 1); 67 67 memcpy(text, str, size);
+190 -225
scripts/kconfig/zconf.tab.c_shipped
··· 1 - /* A Bison parser, made by GNU Bison 2.3. */ 1 + 2 + /* A Bison parser, made by GNU Bison 2.4.1. */ 2 3 3 4 /* Skeleton implementation for Bison's Yacc-like parsers in C 4 - 5 - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 5 + 6 + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 6 7 Free Software Foundation, Inc. 7 - 8 - This program is free software; you can redistribute it and/or modify 8 + 9 + This program is free software: you can redistribute it and/or modify 9 10 it under the terms of the GNU General Public License as published by 10 - the Free Software Foundation; either version 2, or (at your option) 11 - any later version. 12 - 11 + the Free Software Foundation, either version 3 of the License, or 12 + (at your option) any later version. 13 + 13 14 This program is distributed in the hope that it will be useful, 14 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 17 GNU General Public License for more details. 17 - 18 + 18 19 You should have received a copy of the GNU General Public License 19 - along with this program; if not, write to the Free Software 20 - Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 - Boston, MA 02110-1301, USA. */ 20 + along with this program. If not, see <http://www.gnu.org/licenses/>. */ 22 21 23 22 /* As a special exception, you may create a larger work that contains 24 23 part or all of the Bison parser skeleton and distribute that work ··· 28 29 special exception, which will cause the skeleton and the resulting 29 30 Bison output files to be licensed under the GNU General Public 30 31 License without this special exception. 31 - 32 + 32 33 This special exception was added by the Free Software Foundation in 33 34 version 2.2 of Bison. */ 34 35 ··· 46 47 #define YYBISON 1 47 48 48 49 /* Bison version. */ 49 - #define YYBISON_VERSION "2.3" 50 + #define YYBISON_VERSION "2.4.1" 50 51 51 52 /* Skeleton name. */ 52 53 #define YYSKELETON_NAME "yacc.c" ··· 54 55 /* Pure parsers. */ 55 56 #define YYPURE 0 56 57 58 + /* Push parsers. */ 59 + #define YYPUSH 0 60 + 61 + /* Pull parsers. */ 62 + #define YYPULL 1 63 + 57 64 /* Using locations. */ 58 65 #define YYLSP_NEEDED 0 59 66 60 67 /* Substitute the variable and function names. */ 61 - #define yyparse zconfparse 62 - #define yylex zconflex 63 - #define yyerror zconferror 64 - #define yylval zconflval 65 - #define yychar zconfchar 66 - #define yydebug zconfdebug 67 - #define yynerrs zconfnerrs 68 + #define yyparse zconfparse 69 + #define yylex zconflex 70 + #define yyerror zconferror 71 + #define yylval zconflval 72 + #define yychar zconfchar 73 + #define yydebug zconfdebug 74 + #define yynerrs zconfnerrs 75 + 76 + 77 + /* Copy the first part of user declarations. */ 78 + 79 + 80 + /* 81 + * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> 82 + * Released under the terms of the GNU GPL v2.0. 83 + */ 84 + 85 + #include <ctype.h> 86 + #include <stdarg.h> 87 + #include <stdio.h> 88 + #include <stdlib.h> 89 + #include <string.h> 90 + #include <stdbool.h> 91 + 92 + #define LKC_DIRECT_LINK 93 + #include "lkc.h" 94 + 95 + #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) 96 + 97 + #define PRINTD 0x0001 98 + #define DEBUG_PARSE 0x0002 99 + 100 + int cdebug = PRINTD; 101 + 102 + extern int zconflex(void); 103 + static void zconfprint(const char *err, ...); 104 + static void zconf_error(const char *err, ...); 105 + static void zconferror(const char *err); 106 + static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken); 107 + 108 + struct symbol *symbol_hash[257]; 109 + 110 + static struct menu *current_menu, *current_entry; 111 + 112 + #define YYDEBUG 0 113 + #if YYDEBUG 114 + #define YYERROR_VERBOSE 115 + #endif 116 + 117 + 118 + 119 + /* Enabling traces. */ 120 + #ifndef YYDEBUG 121 + # define YYDEBUG 0 122 + #endif 123 + 124 + /* Enabling verbose error messages. */ 125 + #ifdef YYERROR_VERBOSE 126 + # undef YYERROR_VERBOSE 127 + # define YYERROR_VERBOSE 1 128 + #else 129 + # define YYERROR_VERBOSE 0 130 + #endif 131 + 132 + /* Enabling the token table. */ 133 + #ifndef YYTOKEN_TABLE 134 + # define YYTOKEN_TABLE 0 135 + #endif 68 136 69 137 70 138 /* Tokens. */ ··· 174 108 T_NOT = 289 175 109 }; 176 110 #endif 177 - /* Tokens. */ 178 - #define T_MAINMENU 258 179 - #define T_MENU 259 180 - #define T_ENDMENU 260 181 - #define T_SOURCE 261 182 - #define T_CHOICE 262 183 - #define T_ENDCHOICE 263 184 - #define T_COMMENT 264 185 - #define T_CONFIG 265 186 - #define T_MENUCONFIG 266 187 - #define T_HELP 267 188 - #define T_HELPTEXT 268 189 - #define T_IF 269 190 - #define T_ENDIF 270 191 - #define T_DEPENDS 271 192 - #define T_OPTIONAL 272 193 - #define T_PROMPT 273 194 - #define T_TYPE 274 195 - #define T_DEFAULT 275 196 - #define T_SELECT 276 197 - #define T_RANGE 277 198 - #define T_OPTION 278 199 - #define T_ON 279 200 - #define T_WORD 280 201 - #define T_WORD_QUOTE 281 202 - #define T_UNEQUAL 282 203 - #define T_CLOSE_PAREN 283 204 - #define T_OPEN_PAREN 284 205 - #define T_EOL 285 206 - #define T_OR 286 207 - #define T_AND 287 208 - #define T_EQUAL 288 209 - #define T_NOT 289 210 111 211 112 212 - 213 - 214 - /* Copy the first part of user declarations. */ 215 - 216 - 217 - /* 218 - * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> 219 - * Released under the terms of the GNU GPL v2.0. 220 - */ 221 - 222 - #include <ctype.h> 223 - #include <stdarg.h> 224 - #include <stdio.h> 225 - #include <stdlib.h> 226 - #include <string.h> 227 - #include <stdbool.h> 228 - 229 - #define LKC_DIRECT_LINK 230 - #include "lkc.h" 231 - 232 - #include "zconf.hash.c" 233 - 234 - #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) 235 - 236 - #define PRINTD 0x0001 237 - #define DEBUG_PARSE 0x0002 238 - 239 - int cdebug = PRINTD; 240 - 241 - extern int zconflex(void); 242 - static void zconfprint(const char *err, ...); 243 - static void zconf_error(const char *err, ...); 244 - static void zconferror(const char *err); 245 - static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken); 246 - 247 - struct symbol *symbol_hash[257]; 248 - 249 - static struct menu *current_menu, *current_entry; 250 - 251 - #define YYDEBUG 0 252 - #if YYDEBUG 253 - #define YYERROR_VERBOSE 254 - #endif 255 - 256 - 257 - /* Enabling traces. */ 258 - #ifndef YYDEBUG 259 - # define YYDEBUG 0 260 - #endif 261 - 262 - /* Enabling verbose error messages. */ 263 - #ifdef YYERROR_VERBOSE 264 - # undef YYERROR_VERBOSE 265 - # define YYERROR_VERBOSE 1 266 - #else 267 - # define YYERROR_VERBOSE 0 268 - #endif 269 - 270 - /* Enabling the token table. */ 271 - #ifndef YYTOKEN_TABLE 272 - # define YYTOKEN_TABLE 0 273 - #endif 274 113 275 114 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 276 115 typedef union YYSTYPE 277 - 278 116 { 117 + 118 + 279 119 char *string; 280 120 struct file *file; 281 121 struct symbol *symbol; 282 122 struct expr *expr; 283 123 struct menu *menu; 284 124 struct kconf_id *id; 285 - } 286 - /* Line 187 of yacc.c. */ 287 125 288 - YYSTYPE; 126 + 127 + 128 + } YYSTYPE; 129 + # define YYSTYPE_IS_TRIVIAL 1 289 130 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 290 131 # define YYSTYPE_IS_DECLARED 1 291 - # define YYSTYPE_IS_TRIVIAL 1 292 132 #endif 293 - 294 133 295 134 296 135 /* Copy the second part of user declarations. */ 297 136 298 137 299 - /* Line 216 of yacc.c. */ 138 + /* Include zconf.hash.c here so it can see the token constants. */ 139 + #include "zconf.hash.c" 140 + 300 141 301 142 302 143 #ifdef short ··· 279 306 #if (defined __STDC__ || defined __C99__FUNC__ \ 280 307 || defined __cplusplus || defined _MSC_VER) 281 308 static int 282 - YYID (int i) 309 + YYID (int yyi) 283 310 #else 284 311 static int 285 - YYID (i) 286 - int i; 312 + YYID (yyi) 313 + int yyi; 287 314 #endif 288 315 { 289 - return i; 316 + return yyi; 290 317 } 291 318 #endif 292 319 ··· 367 394 /* A type that is properly aligned for any stack member. */ 368 395 union yyalloc 369 396 { 370 - yytype_int16 yyss; 371 - YYSTYPE yyvs; 372 - }; 397 + yytype_int16 yyss_alloc; 398 + YYSTYPE yyvs_alloc; 399 + }; 373 400 374 401 /* The size of the maximum gap between one aligned stack and the next. */ 375 402 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) ··· 403 430 elements in the stack, and YYPTR gives the new location of the 404 431 stack. Advance YYPTR to a properly aligned location for the next 405 432 stack. */ 406 - # define YYSTACK_RELOCATE(Stack) \ 433 + # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 407 434 do \ 408 435 { \ 409 436 YYSIZE_T yynewbytes; \ 410 - YYCOPY (&yyptr->Stack, Stack, yysize); \ 411 - Stack = &yyptr->Stack; \ 437 + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 438 + Stack = &yyptr->Stack_alloc; \ 412 439 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 413 440 yyptr += yynewbytes / sizeof (*yyptr); \ 414 441 } \ ··· 531 558 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 532 559 static const yytype_uint16 yyrline[] = 533 560 { 534 - 0, 104, 104, 106, 108, 109, 110, 111, 112, 113, 535 - 114, 118, 122, 122, 122, 122, 122, 122, 122, 126, 536 - 127, 128, 129, 130, 131, 135, 136, 142, 150, 156, 537 - 164, 174, 176, 177, 178, 179, 180, 181, 184, 192, 538 - 198, 208, 214, 220, 223, 225, 236, 237, 242, 251, 539 - 256, 264, 267, 269, 270, 271, 272, 273, 276, 282, 540 - 293, 299, 309, 311, 316, 324, 332, 335, 337, 338, 541 - 339, 344, 351, 356, 364, 367, 369, 370, 371, 374, 542 - 382, 389, 396, 402, 409, 411, 412, 413, 416, 424, 543 - 426, 431, 432, 435, 436, 437, 441, 442, 445, 446, 544 - 449, 450, 451, 452, 453, 454, 455, 458, 459, 462, 545 - 463 561 + 0, 107, 107, 109, 111, 112, 113, 114, 115, 116, 562 + 117, 121, 125, 125, 125, 125, 125, 125, 125, 129, 563 + 130, 131, 132, 133, 134, 138, 139, 145, 153, 159, 564 + 167, 177, 179, 180, 181, 182, 183, 184, 187, 195, 565 + 201, 211, 217, 223, 226, 228, 239, 240, 245, 254, 566 + 259, 267, 270, 272, 273, 274, 275, 276, 279, 285, 567 + 296, 302, 312, 314, 319, 327, 335, 338, 340, 341, 568 + 342, 347, 354, 359, 367, 370, 372, 373, 374, 377, 569 + 385, 392, 399, 405, 412, 414, 415, 416, 419, 427, 570 + 429, 434, 435, 438, 439, 440, 444, 445, 448, 449, 571 + 452, 453, 454, 455, 456, 457, 458, 461, 462, 465, 572 + 466 546 573 }; 547 574 #endif 548 575 ··· 958 985 #if (defined __STDC__ || defined __C99__FUNC__ \ 959 986 || defined __cplusplus || defined _MSC_VER) 960 987 static void 961 - yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) 988 + yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 962 989 #else 963 990 static void 964 - yy_stack_print (bottom, top) 965 - yytype_int16 *bottom; 966 - yytype_int16 *top; 991 + yy_stack_print (yybottom, yytop) 992 + yytype_int16 *yybottom; 993 + yytype_int16 *yytop; 967 994 #endif 968 995 { 969 996 YYFPRINTF (stderr, "Stack now"); 970 - for (; bottom <= top; ++bottom) 971 - YYFPRINTF (stderr, " %d", *bottom); 997 + for (; yybottom <= yytop; yybottom++) 998 + { 999 + int yybot = *yybottom; 1000 + YYFPRINTF (stderr, " %d", yybot); 1001 + } 972 1002 YYFPRINTF (stderr, "\n"); 973 1003 } 974 1004 ··· 1005 1029 /* The symbols being reduced. */ 1006 1030 for (yyi = 0; yyi < yynrhs; yyi++) 1007 1031 { 1008 - fprintf (stderr, " $%d = ", yyi + 1); 1032 + YYFPRINTF (stderr, " $%d = ", yyi + 1); 1009 1033 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 1010 1034 &(yyvsp[(yyi + 1) - (yynrhs)]) 1011 1035 ); 1012 - fprintf (stderr, "\n"); 1036 + YYFPRINTF (stderr, "\n"); 1013 1037 } 1014 1038 } 1015 1039 ··· 1319 1343 break; 1320 1344 } 1321 1345 } 1322 - 1323 1346 1324 1347 /* Prevent warnings from -Wmissing-prototypes. */ 1325 - 1326 1348 #ifdef YYPARSE_PARAM 1327 1349 #if defined __STDC__ || defined __cplusplus 1328 1350 int yyparse (void *YYPARSE_PARAM); ··· 1336 1362 #endif /* ! YYPARSE_PARAM */ 1337 1363 1338 1364 1339 - 1340 - /* The look-ahead symbol. */ 1365 + /* The lookahead symbol. */ 1341 1366 int yychar; 1342 1367 1343 - /* The semantic value of the look-ahead symbol. */ 1368 + /* The semantic value of the lookahead symbol. */ 1344 1369 YYSTYPE yylval; 1345 1370 1346 1371 /* Number of syntax errors so far. */ ··· 1347 1374 1348 1375 1349 1376 1350 - /*----------. 1351 - | yyparse. | 1352 - `----------*/ 1377 + /*-------------------------. 1378 + | yyparse or yypush_parse. | 1379 + `-------------------------*/ 1353 1380 1354 1381 #ifdef YYPARSE_PARAM 1355 1382 #if (defined __STDC__ || defined __C99__FUNC__ \ ··· 1373 1400 #endif 1374 1401 #endif 1375 1402 { 1376 - 1377 - int yystate; 1403 + 1404 + 1405 + int yystate; 1406 + /* Number of tokens to shift before error messages enabled. */ 1407 + int yyerrstatus; 1408 + 1409 + /* The stacks and their tools: 1410 + `yyss': related to states. 1411 + `yyvs': related to semantic values. 1412 + 1413 + Refer to the stacks thru separate pointers, to allow yyoverflow 1414 + to reallocate them elsewhere. */ 1415 + 1416 + /* The state stack. */ 1417 + yytype_int16 yyssa[YYINITDEPTH]; 1418 + yytype_int16 *yyss; 1419 + yytype_int16 *yyssp; 1420 + 1421 + /* The semantic value stack. */ 1422 + YYSTYPE yyvsa[YYINITDEPTH]; 1423 + YYSTYPE *yyvs; 1424 + YYSTYPE *yyvsp; 1425 + 1426 + YYSIZE_T yystacksize; 1427 + 1378 1428 int yyn; 1379 1429 int yyresult; 1380 - /* Number of tokens to shift before error messages enabled. */ 1381 - int yyerrstatus; 1382 - /* Look-ahead token as an internal (translated) token number. */ 1383 - int yytoken = 0; 1430 + /* Lookahead token as an internal (translated) token number. */ 1431 + int yytoken; 1432 + /* The variables used to return semantic value and location from the 1433 + action routines. */ 1434 + YYSTYPE yyval; 1435 + 1384 1436 #if YYERROR_VERBOSE 1385 1437 /* Buffer for error messages, and its allocated size. */ 1386 1438 char yymsgbuf[128]; ··· 1413 1415 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 1414 1416 #endif 1415 1417 1416 - /* Three stacks and their tools: 1417 - `yyss': related to states, 1418 - `yyvs': related to semantic values, 1419 - `yyls': related to locations. 1420 - 1421 - Refer to the stacks thru separate pointers, to allow yyoverflow 1422 - to reallocate them elsewhere. */ 1423 - 1424 - /* The state stack. */ 1425 - yytype_int16 yyssa[YYINITDEPTH]; 1426 - yytype_int16 *yyss = yyssa; 1427 - yytype_int16 *yyssp; 1428 - 1429 - /* The semantic value stack. */ 1430 - YYSTYPE yyvsa[YYINITDEPTH]; 1431 - YYSTYPE *yyvs = yyvsa; 1432 - YYSTYPE *yyvsp; 1433 - 1434 - 1435 - 1436 1418 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1437 - 1438 - YYSIZE_T yystacksize = YYINITDEPTH; 1439 - 1440 - /* The variables used to return semantic value and location from the 1441 - action routines. */ 1442 - YYSTYPE yyval; 1443 - 1444 1419 1445 1420 /* The number of symbols on the RHS of the reduced rule. 1446 1421 Keep to zero when no symbol should be popped. */ 1447 1422 int yylen = 0; 1423 + 1424 + yytoken = 0; 1425 + yyss = yyssa; 1426 + yyvs = yyvsa; 1427 + yystacksize = YYINITDEPTH; 1448 1428 1449 1429 YYDPRINTF ((stderr, "Starting parse\n")); 1450 1430 1451 1431 yystate = 0; 1452 1432 yyerrstatus = 0; 1453 1433 yynerrs = 0; 1454 - yychar = YYEMPTY; /* Cause a token to be read. */ 1434 + yychar = YYEMPTY; /* Cause a token to be read. */ 1455 1435 1456 1436 /* Initialize stack pointers. 1457 1437 Waste one element of value and location stack 1458 1438 so that they stay on the same level as the state stack. 1459 1439 The wasted elements are never initialized. */ 1460 - 1461 1440 yyssp = yyss; 1462 1441 yyvsp = yyvs; 1463 1442 ··· 1464 1489 YYSTYPE *yyvs1 = yyvs; 1465 1490 yytype_int16 *yyss1 = yyss; 1466 1491 1467 - 1468 1492 /* Each stack pointer address is followed by the size of the 1469 1493 data in use in that stack, in bytes. This used to be a 1470 1494 conditional around just the two extra args, but that might ··· 1471 1497 yyoverflow (YY_("memory exhausted"), 1472 1498 &yyss1, yysize * sizeof (*yyssp), 1473 1499 &yyvs1, yysize * sizeof (*yyvsp), 1474 - 1475 1500 &yystacksize); 1476 1501 1477 1502 yyss = yyss1; ··· 1493 1520 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 1494 1521 if (! yyptr) 1495 1522 goto yyexhaustedlab; 1496 - YYSTACK_RELOCATE (yyss); 1497 - YYSTACK_RELOCATE (yyvs); 1498 - 1523 + YYSTACK_RELOCATE (yyss_alloc, yyss); 1524 + YYSTACK_RELOCATE (yyvs_alloc, yyvs); 1499 1525 # undef YYSTACK_RELOCATE 1500 1526 if (yyss1 != yyssa) 1501 1527 YYSTACK_FREE (yyss1); ··· 1505 1533 yyssp = yyss + yysize - 1; 1506 1534 yyvsp = yyvs + yysize - 1; 1507 1535 1508 - 1509 1536 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 1510 1537 (unsigned long int) yystacksize)); 1511 1538 ··· 1514 1543 1515 1544 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 1516 1545 1546 + if (yystate == YYFINAL) 1547 + YYACCEPT; 1548 + 1517 1549 goto yybackup; 1518 1550 1519 1551 /*-----------. ··· 1525 1551 yybackup: 1526 1552 1527 1553 /* Do appropriate processing given the current state. Read a 1528 - look-ahead token if we need one and don't already have one. */ 1554 + lookahead token if we need one and don't already have one. */ 1529 1555 1530 - /* First try to decide what to do without reference to look-ahead token. */ 1556 + /* First try to decide what to do without reference to lookahead token. */ 1531 1557 yyn = yypact[yystate]; 1532 1558 if (yyn == YYPACT_NINF) 1533 1559 goto yydefault; 1534 1560 1535 - /* Not known => get a look-ahead token if don't already have one. */ 1561 + /* Not known => get a lookahead token if don't already have one. */ 1536 1562 1537 - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ 1563 + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 1538 1564 if (yychar == YYEMPTY) 1539 1565 { 1540 1566 YYDPRINTF ((stderr, "Reading a token: ")); ··· 1566 1592 goto yyreduce; 1567 1593 } 1568 1594 1569 - if (yyn == YYFINAL) 1570 - YYACCEPT; 1571 - 1572 1595 /* Count tokens shifted since error; after three, turn off error 1573 1596 status. */ 1574 1597 if (yyerrstatus) 1575 1598 yyerrstatus--; 1576 1599 1577 - /* Shift the look-ahead token. */ 1600 + /* Shift the lookahead token. */ 1578 1601 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1579 1602 1580 - /* Discard the shifted token unless it is eof. */ 1581 - if (yychar != YYEOF) 1582 - yychar = YYEMPTY; 1603 + /* Discard the shifted token. */ 1604 + yychar = YYEMPTY; 1583 1605 1584 1606 yystate = yyn; 1585 1607 *++yyvsp = yylval; ··· 1999 2029 break; 2000 2030 2001 2031 2002 - /* Line 1267 of yacc.c. */ 2003 2032 2004 2033 default: break; 2005 2034 } ··· 2009 2040 YY_STACK_PRINT (yyss, yyssp); 2010 2041 2011 2042 *++yyvsp = yyval; 2012 - 2013 2043 2014 2044 /* Now `shift' the result of the reduction. Determine what state 2015 2045 that goes to, based on the state we popped back to and the rule ··· 2074 2106 2075 2107 if (yyerrstatus == 3) 2076 2108 { 2077 - /* If just tried and failed to reuse look-ahead token after an 2109 + /* If just tried and failed to reuse lookahead token after an 2078 2110 error, discard it. */ 2079 2111 2080 2112 if (yychar <= YYEOF) ··· 2091 2123 } 2092 2124 } 2093 2125 2094 - /* Else will try to reuse look-ahead token after shifting the error 2126 + /* Else will try to reuse lookahead token after shifting the error 2095 2127 token. */ 2096 2128 goto yyerrlab1; 2097 2129 ··· 2148 2180 YY_STACK_PRINT (yyss, yyssp); 2149 2181 } 2150 2182 2151 - if (yyn == YYFINAL) 2152 - YYACCEPT; 2153 - 2154 2183 *++yyvsp = yylval; 2155 2184 2156 2185 ··· 2172 2207 yyresult = 1; 2173 2208 goto yyreturn; 2174 2209 2175 - #ifndef yyoverflow 2210 + #if !defined(yyoverflow) || YYERROR_VERBOSE 2176 2211 /*-------------------------------------------------. 2177 2212 | yyexhaustedlab -- memory exhaustion comes here. | 2178 2213 `-------------------------------------------------*/ ··· 2183 2218 #endif 2184 2219 2185 2220 yyreturn: 2186 - if (yychar != YYEOF && yychar != YYEMPTY) 2221 + if (yychar != YYEMPTY) 2187 2222 yydestruct ("Cleanup: discarding lookahead", 2188 2223 yytoken, &yylval); 2189 2224 /* Do not reclaim the symbols of the rule which action triggered ··· 2249 2284 sym_set_change_count(1); 2250 2285 } 2251 2286 2252 - const char *zconf_tokenname(int token) 2287 + static const char *zconf_tokenname(int token) 2253 2288 { 2254 2289 switch (token) { 2255 2290 case T_MENU: return "menu"; ··· 2313 2348 #endif 2314 2349 } 2315 2350 2316 - void print_quoted_string(FILE *out, const char *str) 2351 + static void print_quoted_string(FILE *out, const char *str) 2317 2352 { 2318 2353 const char *p; 2319 2354 int len; ··· 2330 2365 putc('"', out); 2331 2366 } 2332 2367 2333 - void print_symbol(FILE *out, struct menu *menu) 2368 + static void print_symbol(FILE *out, struct menu *menu) 2334 2369 { 2335 2370 struct symbol *sym = menu->sym; 2336 2371 struct property *prop;
+8 -5
scripts/kconfig/zconf.y
··· 14 14 #define LKC_DIRECT_LINK 15 15 #include "lkc.h" 16 16 17 - #include "zconf.hash.c" 18 - 19 17 #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) 20 18 21 19 #define PRINTD 0x0001 ··· 97 99 if (current_menu == $$) 98 100 menu_end_menu(); 99 101 } if_entry menu_entry choice_entry 102 + 103 + %{ 104 + /* Include zconf.hash.c here so it can see the token constants. */ 105 + #include "zconf.hash.c" 106 + %} 100 107 101 108 %% 102 109 input: stmt_list; ··· 504 501 sym_set_change_count(1); 505 502 } 506 503 507 - const char *zconf_tokenname(int token) 504 + static const char *zconf_tokenname(int token) 508 505 { 509 506 switch (token) { 510 507 case T_MENU: return "menu"; ··· 568 565 #endif 569 566 } 570 567 571 - void print_quoted_string(FILE *out, const char *str) 568 + static void print_quoted_string(FILE *out, const char *str) 572 569 { 573 570 const char *p; 574 571 int len; ··· 585 582 putc('"', out); 586 583 } 587 584 588 - void print_symbol(FILE *out, struct menu *menu) 585 + static void print_symbol(FILE *out, struct menu *menu) 589 586 { 590 587 struct symbol *sym = menu->sym; 591 588 struct property *prop;
+1 -1
sound/oss/hex2hex.c
··· 12 12 #define MAX_SIZE (256*1024) 13 13 unsigned char buf[MAX_SIZE]; 14 14 15 - int loadhex(FILE *inf, unsigned char *buf) 15 + static int loadhex(FILE *inf, unsigned char *buf) 16 16 { 17 17 int l=0, c, i; 18 18