From d6514a47f24e86c374625963451c37cbaf8d49a7 Mon Sep 17 00:00:00 2001 From: Robert Fewell <14uBobIT@gmail.com> Date: Tue, 21 Feb 2023 10:11:25 +0000 Subject: [PATCH] Windows build failure, variable set but not used With the introduction of using -Werror=unused-but-set-variable, a variable in strptime.c was defined but no used. Moved to be included in #ifdef _NL_CURRENT as that is where it is used. --- borrowed/libc/strptime.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/borrowed/libc/strptime.c b/borrowed/libc/strptime.c index ff6b152f2c..58af36ff11 100644 --- a/borrowed/libc/strptime.c +++ b/borrowed/libc/strptime.c @@ -436,14 +436,13 @@ int era_cnt; int have_mon, have_mday; #ifdef _NL_CURRENT size_t num_eras; -#endif struct era_entry *era; - + era = NULL; +#endif have_I = is_pm = 0; century = -1; want_century = 0; want_era = 0; - era = NULL; have_wday = want_xday = have_yday = have_mon = have_mday = 0;