From 97508498db8ea834863c38c0bf30cf9cd16bb442 Mon Sep 17 00:00:00 2001 From: nick black Date: Sat, 23 Mar 2024 06:09:16 -0400 Subject: [PATCH] init_lang: remove dead code --- src/lib/notcurses.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/notcurses.c b/src/lib/notcurses.c index f34c600e1..2f7fda4cb 100644 --- a/src/lib/notcurses.c +++ b/src/lib/notcurses.c @@ -1090,9 +1090,8 @@ int ncplane_destroy_family(ncplane *ncp){ // called setlocale() themselves, and set the NCOPTION_INHIBIT_SETLOCALE flag. // if that flag is set, we take the locale and encoding as we get them. void init_lang(void){ - char* setret; #ifdef __MINGW32__ - if((setret = setlocale(LC_ALL, ".UTF8")) == NULL){ + if(setlocale(LC_ALL, ".UTF8") == NULL){ logwarn("couldn't set LC_ALL to utf8"); } #endif @@ -1107,7 +1106,7 @@ void init_lang(void){ return; } #ifndef __MINGW32__ - if((setret = setlocale(LC_ALL, "")) == NULL){ + if(setlocale(LC_ALL, "") == NULL){ logwarn("setting locale based on LANG failed"); } #endif