diff --git a/src/getopt.c b/src/getopt.c
index 50bb94f..eff6d0b 100644
--- a/src/getopt.c
+++ b/src/getopt.c
@@ -434,6 +434,10 @@ _getopt_initialize (int argc, char *const *argv, const char *optstring)
}
else
nonoption_flags_len = 0;
+#else
+ /* Disable "unused" warnings */
+ (void) argc;
+ (void) argv;
#endif
return optstring;
@@ -677,16 +681,18 @@ _getopt_internal (int argc, char *const *argv, const char *optstring,
else
{
if (opterr)
- if (argv[optind - 1][1] == '-')
- /* --option */
- fprintf (stderr,
- _("%s: option '--%s' doesn't allow an argument\n"),
- argv[0], pfound->name);
- else
- /* +option or -option */
- fprintf (stderr,
- _("%s: option '%c%s' doesn't allow an argument\n"),
- argv[0], argv[optind - 1][0], pfound->name);
+ {
+ if (argv[optind - 1][1] == '-')
+ /* --option */
+ fprintf (stderr,
+ _("%s: option '--%s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+ else
+ /* +option or -option */
+ fprintf (stderr,
+ _("%s: option '%c%s' doesn't allow an argument\n"),
+ argv[0], argv[optind - 1][0], pfound->name);
+ }
nextchar += strlen (nextchar);
diff --git a/src/job.c b/src/job.c
index 92d48bc..41b70dc 100644
--- a/src/job.c
+++ b/src/job.c
@@ -18,6 +18,7 @@ this program. If not, see . */
#include
#include
+#include
#include "job.h"
#include "debug.h"
@@ -2371,7 +2372,7 @@ child_execute_job (struct childbase *child, int good_stdin, char **argv)
break;
}
- cmd = (char *)find_in_given_path (argv[0], p);
+ cmd = (char *)find_in_given_path (argv[0], p, false);
}
if (!cmd)
diff --git a/src/read.c b/src/read.c
index 53fee22..1c9510e 100644
--- a/src/read.c
+++ b/src/read.c
@@ -2834,6 +2834,7 @@ get_next_mword (char *buffer, char **startp, size_t *length)
&& (p - beg == 2 || p[-3] == '(')))
#endif
goto done_word;
+ /* fall through */
case '$':
c = *(p++);