From 137dc6c3470127c9c7ec5ea616ea22cee6c2fdec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?= Date: Sun, 11 Sep 2022 11:22:26 +0200 Subject: [PATCH] Suppress -Wshadow Solves: /fmt/include/fmt/ostream.h:89:18: warning: declaration of 'fbuf' shadows a previous local [-Wshadow] 89 | else if (auto* fbuf = dynamic_cast<__gnu_cxx::stdio_filebuf*>(rdbuf)) | ^~~~ C:/GIT/ok-mimot/libs/3rdParty/fmt/include/fmt/ostream.h:87:13: note: shadowed declaration is here 87 | if (auto* fbuf = dynamic_cast<__gnu_cxx::stdio_sync_filebuf*>(rdbuf)) | ^~~~ --- include/fmt/ostream.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fmt/ostream.h b/include/fmt/ostream.h index c3cdd4a61b2cd..86ec47e13ad7d 100644 --- a/include/fmt/ostream.h +++ b/include/fmt/ostream.h @@ -84,8 +84,8 @@ inline bool write_ostream_unicode(std::ostream& os, fmt::string_view data) { #elif defined(_WIN32) && defined(__GLIBCXX__) auto* rdbuf = os.rdbuf(); FILE* c_file; - if (auto* fbuf = dynamic_cast<__gnu_cxx::stdio_sync_filebuf*>(rdbuf)) - c_file = fbuf->file(); + if (auto* sfbuf = dynamic_cast<__gnu_cxx::stdio_sync_filebuf*>(rdbuf)) + c_file = sfbuf->file(); else if (auto* fbuf = dynamic_cast<__gnu_cxx::stdio_filebuf*>(rdbuf)) c_file = fbuf->file(); else