History

kbuild: add static to prototypes

Warnings found via gcc -Wmissing-prototypes.

Trevor Keith committed 17 years ago

Commit 4356f481 parent 66a57069 files · +43 −43Browse files

Showing the changes to scripts/basic/docproc.c (1 of 9 files). Show all

Unified · Split

scripts/basic/docproc.c+17−17
@@ -71,7 +71,7 @@ FILELINE * docsection; · 70 unmodified lines
7171
7272 static char *srctree, *kernsrctree;
7373
74−void usage (void)
74+static void usage (void)
7575 {
7676 fprintf(stderr, "Usage: docproc {doc|depend} file\n");
7777 fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n");
@@ -84,7 +84,7 @@ void usage (void) · 6 unmodified lines
8484 /*
8585 * Execute kernel-doc with parameters given in svec
8686 */
87−void exec_kernel_doc(char **svec)
87+static void exec_kernel_doc(char **svec)
8888 {
8989 pid_t pid;
9090 int ret;
@@ -129,7 +129,7 @@ struct symfile · 38 unmodified lines
129129 struct symfile symfilelist[MAXFILES];
130130 int symfilecnt = 0;
131131
132−void add_new_symbol(struct symfile *sym, char * symname)
132+static void add_new_symbol(struct symfile *sym, char * symname)
133133 {
134134 sym->symbollist =
135135 realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *));
@@ -137,14 +137,14 @@ void add_new_symbol(struct symfile *sym, char * symname) · 1 unmodified line
137137 }
138138
139139 /* Add a filename to the list */
140−struct symfile * add_new_file(char * filename)
140+static struct symfile * add_new_file(char * filename)
141141 {
142142 symfilelist[symfilecnt++].filename = strdup(filename);
143143 return &symfilelist[symfilecnt - 1];
144144 }
145145
146146 /* Check if file already are present in the list */
147−struct symfile * filename_exist(char * filename)
147+static struct symfile * filename_exist(char * filename)
148148 {
149149 int i;
150150 for (i=0; i < symfilecnt; i++)
@@ -157,20 +157,20 @@ struct symfile * filename_exist(char * filename) · 6 unmodified lines
157157 * List all files referenced within the template file.
158158 * Files are separated by tabs.
159159 */
160−void adddep(char * file) { printf("\t%s", file); }
161−void adddep2(char * file, char * line) { line = line; adddep(file); }
162−void noaction(char * line) { line = line; }
163−void noaction2(char * file, char * line) { file = file; line = line; }
160+static void adddep(char * file) { printf("\t%s", file); }
161+static void adddep2(char * file, char * line) { line = line; adddep(file); }
162+static void noaction(char * line) { line = line; }
163+static void noaction2(char * file, char * line) { file = file; line = line; }
164164
165165 /* Echo the line without further action */
166−void printline(char * line) { printf("%s", line); }
166+static void printline(char * line) { printf("%s", line); }
167167
168168 /*
169169 * Find all symbols in filename that are exported with EXPORT_SYMBOL &
170170 * EXPORT_SYMBOL_GPL (& EXPORT_SYMBOL_GPL_FUTURE implicitly).
171171 * All symbols located are stored in symfilelist.
172172 */
173−void find_export_symbols(char * filename)
173+static void find_export_symbols(char * filename)
174174 {
175175 FILE * fp;
176176 struct symfile *sym;
@@ -227,7 +227,7 @@ void find_export_symbols(char * filename) · 50 unmodified lines
227227 * intfunc uses -nofunction
228228 * extfunc uses -function
229229 */
230−void docfunctions(char * filename, char * type)
230+static void docfunctions(char * filename, char * type)
231231 {
232232 int i,j;
233233 int symcnt = 0;
@@ -258,15 +258,15 @@ void docfunctions(char * filename, char * type) · 24 unmodified lines
258258 fflush(stdout);
259259 free(vec);
260260 }
261−void intfunc(char * filename) { docfunctions(filename, NOFUNCTION); }
262−void extfunc(char * filename) { docfunctions(filename, FUNCTION); }
261+static void intfunc(char * filename) { docfunctions(filename, NOFUNCTION); }
262+static void extfunc(char * filename) { docfunctions(filename, FUNCTION); }
263263
264264 /*
265265 * Document specific function(s) in a file.
266266 * Call kernel-doc with the following parameters:
267267 * kernel-doc -docbook -function function1 [-function function2]
268268 */
269−void singfunc(char * filename, char * line)
269+static void singfunc(char * filename, char * line)
270270 {
271271 char *vec[200]; /* Enough for specific functions */
272272 int i, idx = 0;
@@ -297,7 +297,7 @@ void singfunc(char * filename, char * line) · 24 unmodified lines
297297 * Call kernel-doc with the following parameters:
298298 * kernel-doc -docbook -function "doc section" filename
299299 */
300−void docsect(char *filename, char *line)
300+static void docsect(char *filename, char *line)
301301 {
302302 char *vec[6]; /* kerneldoc -docbook -function "section" file NULL */
303303 char *s;
@@ -324,7 +324,7 @@ void docsect(char *filename, char *line) · 20 unmodified lines
324324 * 5) Lines containing !P
325325 * 6) Default lines - lines not matching the above
326326 */
327−void parse_file(FILE *infile)
327+static void parse_file(FILE *infile)
328328 {
329329 char line[MAXLINESZ];
330330 char * s;