Skip to content

GCC warnings if [-Wshadow] is enabled.  #770

@Remotion

Description

@Remotion
In file included from \test\warnings_test.cpp:3:0:
fmt/format.h: In function 'Char* fmt::v5::internal::format_decimal(Char*, UInt, unsigned int, ThousandsSep)':
fmt/format.h:1081:55: warning: declaration of 'buffer' shadows a global declaration [-Wshadow]
                             ThousandsSep thousands_sep) {
                                                       ^
In file included from fmt/format.h:67:0,
                 from \test\warnings_test.cpp:3:
fmt/core.h:390:28: note: shadowed declaration is here
 typedef basic_buffer<char> buffer;
                            ^~~~~~
In file included from \test\warnings_test.cpp:3:0:
fmt/format.h: In function 'Iterator fmt::v5::internal::format_decimal(Iterator, UInt, unsigned int, ThousandsSep)':
fmt/format.h:1111:59: warning: declaration of 'buffer' shadows a global declaration [-Wshadow]
   char_type buffer[std::numeric_limits<UInt>::digits10 + 2];
                                                           ^
In file included from fmt/format.h:67:0,
                 from \test\warnings_test.cpp:3:
fmt/core.h:390:28: note: shadowed declaration is here
 typedef basic_buffer<char> buffer;
                            ^~~~~~
In file included from \test\warnings_test.cpp:3:0:
fmt/format.h: In function 'Char* fmt::v5::internal::format_uint(Char*, UInt, unsigned int, bool)':
fmt/format.h:1123:44: warning: declaration of 'buffer' shadows a global declaration [-Wshadow]
                          bool upper = false) {
                                            ^
In file included from fmt/format.h:67:0,
                 from \test\warnings_test.cpp:3:
fmt/core.h:390:28: note: shadowed declaration is here
 typedef basic_buffer<char> buffer;
                            ^~~~~~
In file included from \test\warnings_test.cpp:3:0:
fmt/format.h: In function 'It fmt::v5::internal::format_uint(It, UInt, unsigned int, bool)':
fmt/format.h:1139:64: warning: declaration of 'buffer' shadows a global declaration [-Wshadow]
   char buffer[std::numeric_limits<UInt>::digits / BASE_BITS + 2];
                                                                ^
In file included from fmt/format.h:67:0,
                 from \test\warnings_test.cpp:3:
fmt/core.h:390:28: note: shadowed declaration is here
 typedef basic_buffer<char> buffer;
                            ^~~~~~
In file included from \test\warnings_test.cpp:3:0:
fmt/format.h: In constructor 'constexpr fmt::v5::internal::arg_ref<Char>::arg_ref(unsigned int)':
fmt/format.h:1913:50: warning: declaration of 'index' shadows a member of 'fmt::v5::internal::arg_ref<Char>' [-Wshadow]
   FMT_CONSTEXPR explicit arg_ref(unsigned index) : kind(INDEX), index(index) {}
                                                  ^
fmt/format.h:1924:14: note: shadowed declaration is here
     unsigned index;
              ^~~~~
fmt/format.h: In constructor 'fmt::v5::internal::arg_ref<Char>::arg_ref(fmt::v5::basic_string_view<Char>)':
fmt/format.h:1914:50: warning: declaration of 'name' shadows a member of 'fmt::v5::internal::arg_ref<Char>' [-Wshadow]
   explicit arg_ref(basic_string_view<Char> name) : kind(NAME), name(name) {}
                                                  ^
fmt/format.h:1925:29: note: shadowed declaration is here
     basic_string_view<Char> name;
                             ^~~~
fmt/format.h: In member function 'constexpr typename ParseContext::iterator fmt::v5::formatter<T, Char, typename std::enable_if<fmt::v5::internal::format_type<typename fmt::v5::buffer_context<Char>::type, T>::value>::type>::parse(ParseContext&)':
fmt/format.h:3175:10: warning: declaration of 'type_spec' shadows a global declaration [-Wshadow]
     auto type_spec = specs_.type();
          ^~~~~~~~~
fmt/format.h:1275:37: note: shadowed declaration is here
 typedef format_spec<char, type_tag> type_spec;
                                     ^~~~~~~~~
fmt/format.h: In constructor 'fmt::v5::arg_join<It, Char>::arg_join(It, It, fmt::v5::basic_string_view<Char>)':
fmt/format.h:3405:5: warning: declaration of 'sep' shadows a member of 'fmt::v5::arg_join<It, Char>' [-Wshadow]
     : begin(begin), end(end), sep(sep) {}
     ^
fmt/format.h:3402:27: note: shadowed declaration is here
   basic_string_view<Char> sep;
                           ^~~
fmt/format.h:3405:5: warning: declaration of 'end' shadows a member of 'fmt::v5::arg_join<It, Char>' [-Wshadow]
     : begin(begin), end(end), sep(sep) {}
     ^
fmt/format.h:3401:6: note: shadowed declaration is here
   It end;
      ^~~
fmt/format.h:3405:5: warning: declaration of 'begin' shadows a member of 'fmt::v5::arg_join<It, Char>' [-Wshadow]
     : begin(begin), end(end), sep(sep) {}
     ^
fmt/format.h:3400:6: note: shadowed declaration is here
   It begin;
      ^~~~~
In file included from fmt/format.h:3736:0,
                 from \test\warnings_test.cpp:3:
fmt/format-inl.h: In static member function 'static int fmt::v5::internal::char_traits<char>::format_float(char*, std::size_t, const char*, int, T)':
fmt/format-inl.h:226:79: warning: declaration of 'buffer' shadows a global declaration [-Wshadow]
     char *buffer, std::size_t size, const char *format, int precision, T value) {
                                                                               ^
In file included from fmt/format.h:67:0,
                 from \test\warnings_test.cpp:3:
fmt/core.h:390:28: note: shadowed declaration is here
 typedef basic_buffer<char> buffer;
                            ^~~~~~
In file included from fmt/format.h:3736:0,
                 from \test\warnings_test.cpp:3:
fmt/format-inl.h: In static member function 'static int fmt::v5::internal::char_traits<wchar_t>::format_float(wchar_t*, std::size_t, const wchar_t*, int, T)':
fmt/format-inl.h:235:12: warning: declaration of 'buffer' shadows a global declaration [-Wshadow]
     T value) {
            ^
In file included from fmt/format.h:67:0,
                 from \test\warnings_test.cpp:3:
fmt/core.h:390:28: note: shadowed declaration is here
 typedef basic_buffer<char> buffer;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions