1 Fix compilation warnings in generated code
3 Patch taken from open bug report http://savannah.gnu.org/bugs/?40243
4 (project gengetopt seems to be dead; no hope for a new release soon)
6 Imported by Philippe Mariman.
7 This description by Thomas De Schampheleire.
9 Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
11 Index: gengetopt-2.22.6/src/skels/c_source.cc
12 ===================================================================
13 --- gengetopt-2.22.6.orig/src/skels/c_source.cc 2012-11-07 20:58:29.000000000 +0100
14 +++ gengetopt-2.22.6/src/skels/c_source.cc 2014-11-20 12:05:02.597527761 +0100
15 @@ -2424,9 +2424,12 @@
16 stream << " FIX_UNUSED (field);";
19 + stream << " FIX_UNUSED (stop_char);";
21 + stream << indent_str;
22 + stream << " FIX_UNUSED (val);";
25 - stream << " stop_char = 0;";
28 stream << " found = 0;";
29 @@ -3981,6 +3984,12 @@
35 + stream << " FIX_UNUSED (check_required);";
37 + stream << indent_str;
42 Index: gengetopt-2.22.6/src/skels/c_source.h_skel
43 ===================================================================
44 --- gengetopt-2.22.6.orig/src/skels/c_source.h_skel 2012-11-02 18:43:24.000000000 +0100
45 +++ gengetopt-2.22.6/src/skels/c_source.h_skel 2014-11-20 12:05:22.501528424 +0100
50 + FIX_UNUSED (stop_char);
56 if (!multiple_option && prev_given && (*prev_given || (check_ambiguity && *field_given)))
59 error_occurred += @parser_name@_required2 (args_info, argv[0], additional_error);
62 + FIX_UNUSED (check_required);
65 @parser_name@_release (&local_args_info);