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/edit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bin/ksh/edit.c') diff --git a/bin/ksh/edit.c b/bin/ksh/edit.c index fb85f9ff7f0..115091b179f 100644 --- a/bin/ksh/edit.c +++ b/bin/ksh/edit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: edit.c,v 1.57 2016/09/08 12:12:40 nicm Exp $ */ +/* $OpenBSD: edit.c,v 1.58 2017/12/27 13:02:57 millert Exp $ */ /* * Command line editing - common code @@ -229,7 +229,7 @@ set_editmode(const char *ed) if ((rcp = strrchr(ed, '/'))) ed = ++rcp; for (i = 0; i < NELEM(edit_flags); i++) - if (strstr(ed, options[(int) edit_flags[i]].name)) { + if (strstr(ed, sh_options[(int) edit_flags[i]].name)) { change_flag(edit_flags[i], OF_SPECIAL, 1); return; } @@ -459,7 +459,7 @@ x_command_glob(int flags, const char *str, int slen, char ***wordsp) for (l = genv->loc; l; l = l->next) glob_table(pat, &w, &l->funs); - glob_path(flags, pat, &w, path); + glob_path(flags, pat, &w, search_path); if ((fpath = str_val(global("FPATH"))) != null) glob_path(flags, pat, &w, fpath); -- cgit v1.2.3-59-g8ed1b