Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning: declaration shadows a local variable #1568

Open
marakew opened this issue Dec 9, 2024 · 0 comments
Open

warning: declaration shadows a local variable #1568

marakew opened this issue Dec 9, 2024 · 0 comments

Comments

@marakew
Copy link

marakew commented Dec 9, 2024

would be nice to fix this

In file included from D:\git\boost_\libs\asio\include\boost/asio.hpp:69:
D:\git\boost_\libs\asio\include\boost/asio/co_composed.hpp(720,15): warning: declaration shadows a local variable [-Wshadow-uncaptured-local]
  720 |         auto& promise = *static_cast<derived_type*>(p);
      |               ^
D:\git\boost_\libs\asio\include\boost/asio/co_composed.hpp(713,19): note: previous declaration is here
  713 |     derived_type& promise = *static_cast<derived_type*>(this);
      |                   ^

In file included from D:\git\boost_\libs\asio\include\boost/asio.hpp:70:
In file included from D:\git\boost_\libs\asio\include\boost/asio/co_spawn.hpp:521:
D:\git\boost_\libs\asio\include\boost/asio/impl/co_spawn.hpp(162,42): warning: declaration shadows a local variable [-Wshadow-uncaptured-local]
  162 |         [handler = std::move(s.handler), t = std::move(t)]() mutable
      |                                          ^
D:\git\boost_\libs\asio\include\boost/asio/impl/co_spawn.hpp(150,7): note: previous declaration is here
  150 |     T t = co_await s.function();
      |       ^
In file included from D:\git\boost_\libs\asio\include\boost/asio.hpp:125:
In file included from D:\git\boost_\libs\asio\include\boost/asio/ip/basic_resolver.hpp:31:
In file included from D:\git\boost_\libs\asio\include\boost/asio/ip/basic_resolver_query.hpp:21:
In file included from D:\git\boost_\libs\asio\include\boost/asio/ip/resolver_query_base.hpp:19:
D:\git\boost_\libs\asio\include\boost/asio/ip/resolver_base.hpp(69,5): warning: declaration shadows a variable in namespace 'boost::asio::ip' [-Wshadow]
   69 |     v4_mapped = BOOST_ASIO_OS_DEF(AI_V4MAPPED),
      |     ^
D:\git\boost_\libs\asio\include\boost/asio/ip/address_v6.hpp(290,20): note: previous declaration is here
  290 | enum v4_mapped_t { v4_mapped };
      |                    ^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant