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
71 71
72static char *srctree, *kernsrctree;72static char *srctree, *kernsrctree;
73 73
74void usage (void)74static void usage (void)
75{75{
76 fprintf(stderr, "Usage: docproc {doc|depend} file\n");76 fprintf(stderr, "Usage: docproc {doc|depend} file\n");
77 fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n");77 fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n");
@@ -84,7 +84,7 @@ void usage (void) · 6 unmodified lines
84/*84/*
85 * Execute kernel-doc with parameters given in svec85 * Execute kernel-doc with parameters given in svec
86 */86 */
87void exec_kernel_doc(char **svec)87static void exec_kernel_doc(char **svec)
88{88{
89 pid_t pid;89 pid_t pid;
90 int ret;90 int ret;
@@ -129,7 +129,7 @@ struct symfile · 38 unmodified lines
129struct symfile symfilelist[MAXFILES];129struct symfile symfilelist[MAXFILES];
130int symfilecnt = 0;130int symfilecnt = 0;
131 131
132void add_new_symbol(struct symfile *sym, char * symname)132static void add_new_symbol(struct symfile *sym, char * symname)
133{133{
134 sym->symbollist =134 sym->symbollist =
135 realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *));135 realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *));
@@ -137,14 +137,14 @@ void add_new_symbol(struct symfile *sym, char * symname) · 1 unmodified line
137}137}
138 138
139/* Add a filename to the list */139/* Add a filename to the list */
140struct symfile * add_new_file(char * filename)140static struct symfile * add_new_file(char * filename)
141{141{
142 symfilelist[symfilecnt++].filename = strdup(filename);142 symfilelist[symfilecnt++].filename = strdup(filename);
143 return &symfilelist[symfilecnt - 1];143 return &symfilelist[symfilecnt - 1];
144}144}
145 145
146/* Check if file already are present in the list */146/* Check if file already are present in the list */
147struct symfile * filename_exist(char * filename)147static struct symfile * filename_exist(char * filename)
148{148{
149 int i;149 int i;
150 for (i=0; i < symfilecnt; i++)150 for (i=0; i < symfilecnt; i++)
@@ -157,20 +157,20 @@ struct symfile * filename_exist(char * filename) · 6 unmodified lines
157 * List all files referenced within the template file.157 * List all files referenced within the template file.
158 * Files are separated by tabs.158 * Files are separated by tabs.
159 */159 */
160void adddep(char * file) { printf("\t%s", file); }160static void adddep(char * file) { printf("\t%s", file); }
161void adddep2(char * file, char * line) { line = line; adddep(file); }161static void adddep2(char * file, char * line) { line = line; adddep(file); }
162void noaction(char * line) { line = line; }162static void noaction(char * line) { line = line; }
163void noaction2(char * file, char * line) { file = file; line = line; }163static void noaction2(char * file, char * line) { file = file; line = line; }
164 164
165/* Echo the line without further action */165/* Echo the line without further action */
166void printline(char * line) { printf("%s", line); }166static void printline(char * line) { printf("%s", line); }
167 167
168/*168/*
169 * Find all symbols in filename that are exported with EXPORT_SYMBOL &169 * Find all symbols in filename that are exported with EXPORT_SYMBOL &
170 * EXPORT_SYMBOL_GPL (& EXPORT_SYMBOL_GPL_FUTURE implicitly).170 * EXPORT_SYMBOL_GPL (& EXPORT_SYMBOL_GPL_FUTURE implicitly).
171 * All symbols located are stored in symfilelist.171 * All symbols located are stored in symfilelist.
172 */172 */
173void find_export_symbols(char * filename)173static void find_export_symbols(char * filename)
174{174{
175 FILE * fp;175 FILE * fp;
176 struct symfile *sym;176 struct symfile *sym;
@@ -227,7 +227,7 @@ void find_export_symbols(char * filename) · 50 unmodified lines
227 * intfunc uses -nofunction227 * intfunc uses -nofunction
228 * extfunc uses -function228 * extfunc uses -function
229 */229 */
230void docfunctions(char * filename, char * type)230static void docfunctions(char * filename, char * type)
231{231{
232 int i,j;232 int i,j;
233 int symcnt = 0;233 int symcnt = 0;
@@ -258,15 +258,15 @@ void docfunctions(char * filename, char * type) · 24 unmodified lines
258 fflush(stdout);258 fflush(stdout);
259 free(vec);259 free(vec);
260}260}
261void intfunc(char * filename) { docfunctions(filename, NOFUNCTION); }261static void intfunc(char * filename) { docfunctions(filename, NOFUNCTION); }
262void extfunc(char * filename) { docfunctions(filename, FUNCTION); }262static void extfunc(char * filename) { docfunctions(filename, FUNCTION); }
263 263
264/*264/*
265 * Document specific function(s) in a file.265 * Document specific function(s) in a file.
266 * Call kernel-doc with the following parameters:266 * Call kernel-doc with the following parameters:
267 * kernel-doc -docbook -function function1 [-function function2]267 * kernel-doc -docbook -function function1 [-function function2]
268 */268 */
269void singfunc(char * filename, char * line)269static void singfunc(char * filename, char * line)
270{270{
271 char *vec[200]; /* Enough for specific functions */271 char *vec[200]; /* Enough for specific functions */
272 int i, idx = 0;272 int i, idx = 0;
@@ -297,7 +297,7 @@ void singfunc(char * filename, char * line) · 24 unmodified lines
297 * Call kernel-doc with the following parameters:297 * Call kernel-doc with the following parameters:
298 * kernel-doc -docbook -function "doc section" filename298 * kernel-doc -docbook -function "doc section" filename
299 */299 */
300void docsect(char *filename, char *line)300static void docsect(char *filename, char *line)
301{301{
302 char *vec[6]; /* kerneldoc -docbook -function "section" file NULL */302 char *vec[6]; /* kerneldoc -docbook -function "section" file NULL */
303 char *s;303 char *s;
@@ -324,7 +324,7 @@ void docsect(char *filename, char *line) · 20 unmodified lines
324 * 5) Lines containing !P324 * 5) Lines containing !P
325 * 6) Default lines - lines not matching the above325 * 6) Default lines - lines not matching the above
326 */326 */
327void parse_file(FILE *infile)327static void parse_file(FILE *infile)
328{328{
329 char line[MAXLINESZ];329 char line[MAXLINESZ];
330 char * s;330 char * s;