skypjack / uvw

Header-only, event based, tiny and easy to use libuv wrapper in modern C++ - now available as also shared/static library!
MIT License
1.82k stars 207 forks source link

loop: rename variable to fix `-Wshadow` warning #297

Closed aloisklink closed 1 year ago

aloisklink commented 1 year ago

Fixes the following compiler -Wshadow warning by renaming a variable:

In file included from /uvw/src/uvw/fs.h:11,
                 from /uvw/test/uvw/file_req_sendfile.cpp:3:
/uvw/src/uvw/loop.h: In lambda function:
/uvw/src/uvw/loop.h:281:49: warning: declaration of ‘func’ shadows a previous local [-Wshadow]
  281 |         auto func = [](uv_handle_t *hndl, void *func) {
      |                                           ~~~~~~^~~~
/home/alois/Documents/uvw/src/uvw/loop.h:281:14: note: shadowed declaration is here
  281 |         auto func = [](uv_handle_t *hndl, void *func) {
      |              ^~~~