help-gengetopt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help-gengetopt] warning: function declaration isn't a prototype


From: Lorenzo Bettini
Subject: Re: [help-gengetopt] warning: function declaration isn't a prototype
Date: Tue, 16 Oct 2007 22:56:49 +0200
User-agent: Mozilla-Thunderbird 2.0.0.4 (X11/20070828)

Andre Noll wrote:
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 @address@hidden(void);
  * all its fields to 0
  * @@return the initialized @address@hidden structure
  */
-struct @address@hidden address@hidden@_params_init();
+struct @address@hidden address@hidden@_params_init(void);
/**
  * Initializes the passed @args_info@ structure's fields


I've applied this correction, this will be available in the next release.

thanks!
        Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DSI, Univ. di Firenze
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net





reply via email to

[Prev in Thread] Current Thread [Next in Thread]