python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / gengetopt / 0001-fix-compilation-warnings-in-generated-code.patch
blob88961e6690f4126c3fd53a628f98b84f86a0db8f
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);";
17 stream << "\n";
18 stream << indent_str;
19 + stream << " FIX_UNUSED (stop_char);";
20 + stream << "\n";
21 + stream << indent_str;
22 + stream << " FIX_UNUSED (val);";
23 stream << "\n";
24 stream << indent_str;
25 - stream << " stop_char = 0;";
26 stream << "\n";
27 stream << indent_str;
28 stream << " found = 0;";
29 @@ -3981,6 +3984,12 @@
30 stream << "\n";
31 stream << indent_str;
33 + else
34 + {
35 + stream << " FIX_UNUSED (check_required);";
36 + stream << "\n";
37 + stream << indent_str;
38 + }
39 stream << "\n";
40 stream << indent_str;
41 indent = 2;
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
46 @@ -767,8 +767,9 @@
47 char **string_field;
48 @ENDIF@
49 FIX_UNUSED (field);
50 + FIX_UNUSED (stop_char);
51 + FIX_UNUSED (val);
53 - stop_char = 0;
54 found = 0;
56 if (!multiple_option && prev_given && (*prev_given || (check_ambiguity && *field_given)))
57 @@ -1327,6 +1328,8 @@
59 error_occurred += @parser_name@_required2 (args_info, argv[0], additional_error);
61 +@ELSE@
62 + FIX_UNUSED (check_required);
63 @ENDIF@
65 @parser_name@_release (&local_args_info);