From 5c216e3d8cc25b159c5151e20fe0d6f7bddfb2ed Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Fri, 30 Dec 2022 13:38:47 -0800 Subject: [PATCH] Remove unused 'end' variable from SHLVL calculation --- src/env.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/env.cpp b/src/env.cpp index 92bf37117..38d9fc5f6 100644 --- a/src/env.cpp +++ b/src/env.cpp @@ -376,10 +376,9 @@ void env_init(const struct config_paths_t *paths, bool do_uvars, bool default_pa if (is_interactive_session()) { wcstring nshlvl_str = L"1"; if (const char *shlvl_var = getenv("SHLVL")) { - const wchar_t *end; // TODO: Figure out how to handle invalid numbers better. Shouldn't we issue a // diagnostic? - long shlvl_i = fish_wcstol(str2wcstring(shlvl_var).c_str(), &end); + long shlvl_i = fish_wcstol(str2wcstring(shlvl_var).c_str()); if (!errno && shlvl_i >= 0) { nshlvl_str = to_string(shlvl_i + 1); }