diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-03-09 09:52:07 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-01-02 21:06:37 +0100 |
commit | a70fde1b45859bbe557261493bfff40aa90d469a (patch) | |
tree | 50589bf680a676fe7e0ba7b3d8bd527971d1ca22 /src/nvim/main.c | |
parent | 5fba8159213e7821d16cdbea379cb49ac8a6ee74 (diff) | |
download | rneovim-a70fde1b45859bbe557261493bfff40aa90d469a.tar.gz rneovim-a70fde1b45859bbe557261493bfff40aa90d469a.tar.bz2 rneovim-a70fde1b45859bbe557261493bfff40aa90d469a.zip |
build: enable -Wshadow
Note about shada.c:
- shada_read_next_item_start was intentionally shadowing `unpacked` and
`i` because many of the macros (e.g. ADDITIONAL_KEY) implicitly
depended on those variable names.
- Macros were changed to parameterize `unpacked` (but not `i`). Macros
like CLEAR_GA_AND_ERROR_OUT do control-flow (goto), so any other
approach is messy.
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r-- | src/nvim/main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index 8a40577e8f..17f3a894d4 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -781,7 +781,6 @@ static void command_line_scan(mparm_T *parmp) bool had_minmin = false; // found "--" argument int want_argument; // option argument with argument int c; - char_u *p = NULL; long n; argc--; @@ -1227,7 +1226,7 @@ scripterror: // Add the file to the global argument list. ga_grow(&global_alist.al_ga, 1); - p = vim_strsave((char_u *)argv[0]); + char_u *p = vim_strsave((char_u *)argv[0]); if (parmp->diff_mode && os_isdir(p) && GARGCOUNT > 0 && !os_isdir(alist_name(&GARGLIST[0]))) { |