Mercurial > pidgin
diff src/getopt.h @ 12323:fc464a0abccc
[gaim-migrate @ 14627]
Function prototypes need to be of the form foo(void); instead of foo(); for function that don't take any arguments. This allows the compiler to detect mistakes were someone passes arguments to such a function.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 04 Dec 2005 18:19:56 +0000 |
parents | c0961d8cb0fb |
children | 0d4484b7a46a |
line wrap: on
line diff
--- a/src/getopt.h Sun Dec 04 18:19:06 2005 +0000 +++ b/src/getopt.h Sun Dec 04 18:19:56 2005 +0000 @@ -108,7 +108,7 @@ errors, only prototype getopt for the GNU C library. */ extern int getopt (int argc, char *const *argv, const char *shortopts); #else /* not __GNU_LIBRARY__ */ -extern int getopt (); +extern int getopt (void); #endif /* not __GNU_LIBRARY__ */ extern int getopt_long (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); @@ -122,11 +122,11 @@ const struct option *longopts, int *longind, int long_only); #else /* not __STDC__ */ -extern int getopt (); -extern int getopt_long (); -extern int getopt_long_only (); +extern int getopt (void); +extern int getopt_long (void); +extern int getopt_long_only (void); -extern int _getopt_internal (); +extern int _getopt_internal (void); #endif /* not __STDC__ */ #ifdef __cplusplus