skystrife / cpptoml

cpptoml is a header-only library for parsing TOML

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warnings when compiling with clang-800.0.42.1 (OSX)

nbigaouette opened this issue · comments

I compile my code base with as much warnings as possible and cpptoml reports a couple of variables shadowing:

In file included from src/main.cxx:35:
src/cpptoml.h:1940:42: warning:
      declaration shadows a local variable [-Wshadow]
            = [&](std::string::iterator& it, std::string::iterator& end) {
                                         ^
src/cpptoml.h:1929:51: note: previous
      declaration is here
    parse_multiline_string(std::string::iterator& it,
                                                  ^
src/cpptoml.h:1940:69: warning:
      declaration shadows a local variable [-Wshadow]
            = [&](std::string::iterator& it, std::string::iterator& end) {
                                                                    ^
src/cpptoml.h:1930:51: note: previous
      declaration is here
                           std::string::iterator& end, char delim)

I guess simply using a different variable name for the inner loops will fix this.

This is on c926989.