blob: 7fd8d232f9c20608fc06f136566d6b5618aa1d2d [file] [log] [blame]
Fixes the following warnings:
getopt.c: In function '_getopt_initialize':
getopt.c:382: warning: unused parameter 'argc'
getopt.c:382: warning: unused parameter 'argv'
getopt.c: In function '_getopt_internal':
getopt.c:681: warning: suggest explicit braces to avoid ambiguous 'else'
diff -Naur make-4.2.1/getopt.c make-4.2.1.new/getopt.c
--- make-4.2.1/getopt.c 2016-02-28 18:48:44.000000000 +0100
+++ make-4.2.1.new/getopt.c 2017-02-20 22:52:36.688693011 +0100
@@ -434,6 +434,9 @@
}
else
nonoption_flags_len = 0;
+#else
+ (void)argc;
+ (void)argv;
#endif
return optstring;
@@ -676,7 +679,7 @@
optarg = nameend + 1;
else
{
- if (opterr)
+ if (opterr) {
if (argv[optind - 1][1] == '-')
/* --option */
fprintf (stderr,
@@ -687,7 +690,7 @@
fprintf (stderr,
_("%s: option '%c%s' doesn't allow an argument\n"),
argv[0], argv[optind - 1][0], pfound->name);
-
+ }
nextchar += strlen (nextchar);
optopt = pfound->val;