From 201e0776e68df3547d24a3790d166bbefd438756 Mon Sep 17 00:00:00 2001 From: millert Date: Wed, 27 Dec 2017 13:02:57 +0000 Subject: Add -Wshadow to Makefile and fix the resulting warnings. Many of the warnings are due to the use of globals with generic names, specifically "options" and "path". I've renamed "options" to "sh_options" since it holds the shell options and "path" to "search_path". OK jca@ tb@ --- bin/ksh/exec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bin/ksh/exec.c') diff --git a/bin/ksh/exec.c b/bin/ksh/exec.c index 054f8f3e7cc..09484b8cf75 100644 --- a/bin/ksh/exec.c +++ b/bin/ksh/exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec.c,v 1.69 2017/12/18 20:30:14 anton Exp $ */ +/* $OpenBSD: exec.c,v 1.70 2017/12/27 13:02:57 millert Exp $ */ /* * execute command tree @@ -707,7 +707,7 @@ scriptexec(struct op *tp, char **ap) shell = str_val(global("EXECSHELL")); if (shell && *shell) - shell = search(shell, path, X_OK, NULL); + shell = search(shell, search_path, X_OK, NULL); if (!shell || !*shell) shell = _PATH_BSHELL; @@ -900,8 +900,8 @@ findcom(const char *name, int flags) } tp->flag = DEFINED; /* make ~ISSET */ } - npath = search(name, flags & FC_DEFPATH ? def_path : path, - X_OK, &tp->u2.errno_); + npath = search(name, flags & FC_DEFPATH ? def_path : + search_path, X_OK, &tp->u2.errno_); if (npath) { if (tp == &temp) { tp->val.s = npath; -- cgit v1.2.3-59-g8ed1b