warning: function declaration isn't a prototype

Andre Noll <[email protected]>
Newsgroups gmane.comp.gnu.gengetopt.general
Message-ID <[email protected]>
Hi all,

with the latest gengetopt-2.21 I get tons of these warnings
which are due to me compiling with -Wstrict-prototypes and
foo_cmdline_parser_params_init() missing a void in both the declaration
and the definition. Trivial fix below.

Regards
Andre

diff --git a/src/skels/header.cc b/src/skels/header.cc
index c2ea84d..fd4f153 100644
--- a/src/skels/header.cc
+++ b/src/skels/header.cc
@@ -517,7 +517,7 @@ header_gen_class::generate_header(ostream &stream, unsigned int indent)
   generate_string (parser_name, stream, indent + indent_str.length ());
   stream << "_params *";
   generate_string (parser_name, stream, indent + indent_str.length ());
-  stream << "_params_init();";
+  stream << "_params_init(void);";
   stream << "\n";
   stream << indent_str;
   stream << "\n";
diff --git a/src/skels/header.h_skel b/src/skels/header.h_skel
index a9e0dd2..10d5c6c 100644
--- a/src/skels/header.h_skel
+++ b/src/skels/header.h_skel
@@ -122,7 +122,7 @@ void @parser_name@_print_version(void);
  * all its fields to 0
  * @@return the initialized @parser_name@_params structure
  */
-struct @parser_name@_params *@parser_name@_params_init();
+struct @parser_name@_params *@parser_name@_params_init(void);
 
 /**
  * Initializes the passed @args_info@ structure's fields


-- 
The only person who always got his work done by Friday was Robinson Crusoe

_______________________________________________
Help-gengetopt mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gengetopt
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFGuJfuWto1QDEAkw8RAoDdAJ937KvUSKUhhqOYNpWZ9tVkperGvQCfYNGv
ZGUW1ArQDuj8Uk5eVM/X9IA=
=v10J
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.