Skip to content

-Wmissing-declarations triggered on gcc #388

@Lizzie841

Description

@Lizzie841

What happened?

/src/web_service/verify_user_jwt.cpp:9:
ошибка: отсутствует предварительная декларация «jwt::verify_result_t jwt::is_secret_a_public_key(string_view)» [-Werror=missing-declarations]
28 | verify_result_t is_secret_a_public_key(const jwt::string_view secret)
| ^~~~~~~~~~~~~~~~~~~~~~

Solution is to

#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#pragma GCC diagnostic ignored "-Wmissing-declarations"
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // for deprecated OpenSSL functions
#endif
#include <jwt/jwt.hpp>
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic pop
#endif

How To Reproduce?

#include <jwt/jwt.hpp>

Version

0.7.1

What OS are you seeing the problem on?

Linux

What compiler are you seeing the problem on?

GCC

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions