prototypes for nested functions
Andreas Jaeger
aj@suse.de
Wed Dec 27 09:25:00 GMT 2000
For nested functions I get e.g. this warning:
programs/ld-ctype.c:2880: warning: no previous prototype for `set_default'
The GCC manual suggests to use auto to shut up GCC.
What do you think of the appended patch? Shall I send a similar
version for all nested functions to shut up GCC?
Andreas
2000-12-27 Andreas Jaeger <aj@suse.de>
* locale/programs/ld-ctype.c (set_class_defaults): Provide
prototype for set_default to shut up GCC.
============================================================
Index: locale/programs/ld-ctype.c
--- locale/programs/ld-ctype.c 2000/12/10 16:12:26 1.94
+++ locale/programs/ld-ctype.c 2000/12/27 17:24:05
@@ -2876,6 +2876,8 @@
It may seem that the order of these if-blocks is arbitrary but it is NOT.
Don't move them unless you know what you do! */
+ auto void set_default (int bitpos, int from, int to);
+
void set_default (int bitpos, int from, int to)
{
char tmp[2];
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
More information about the Libc-hacker
mailing list