Skip to content

Variable shadowing in httplib.h #1292

@Morph1984

Description

@Morph1984

The following were found by GCC/Clang

/cpp-httplib/httplib.h:2711:16: error: declaration of 'auto ip' shadows a parameter [-Werror=shadow]
 2711 |           auto ip = if2ip(address_family, intf);
      |                ^~
/cpp-httplib/httplib.h:2701:35: note: shadowed declaration is here
 2701 |     const char *host, const char *ip, int port, int address_family,
      |                       ~~~~~~~~~~~~^~
/cpp-httplib/httplib.h: In lambda function:
/cpp-httplib/httplib.h:7381:16: error: declaration of 'ssl' shadows a previous local [-Werror=shadow]
 7381 |       [&](SSL *ssl) {
      |           ~~~~~^~~
/cpp-httplib/httplib.h:7379:8: note: shadowed declaration is here
 7379 |   auto ssl = detail::ssl_new(
      |        ^~~
/cpp-httplib/httplib.h: In lambda function:
/cpp-httplib/httplib.h:7579:16: error: declaration of 'ssl' shadows a previous local [-Werror=shadow]
 7579 |       [&](SSL *ssl) {
      |           ~~~~~^~~
/cpp-httplib/httplib.h:7577:8: note: shadowed declaration is here
 7577 |   auto ssl = detail::ssl_new(
      |        ^~~
/cpp-httplib/httplib.h: In lambda function:
/cpp-httplib/httplib.h:7620:16: error: declaration of 'ssl' shadows a previous local [-Werror=shadow]
 7620 |       [&](SSL *ssl) {
      |           ~~~~~^~~
/cpp-httplib/httplib.h:7577:8: note: shadowed declaration is here
 7577 |   auto ssl = detail::ssl_new(
      |        ^~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions