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

Silence implicit fallthrough warning on newer GCC versions #359

Merged
merged 1 commit into from
Nov 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions libgearman-server/plugins/protocol/http/protocol.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,17 @@
*/
#define GEARMAND_PROTOCOL_HTTP_DEFAULT_PORT "8080"

#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wold-style-cast"
#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
#if __GNUC__ >= 7
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif /* __GNUC__ >= 7 */
#endif

class HTTPtext;

Expand Down Expand Up @@ -684,4 +693,8 @@ gearmand_error_t HTTP::start(gearmand_st *gearmand)
} // namespace gearmand

/** @} */
#ifdef __clang__
#pragma clang diagnostic pop
#elif defined(__GNUC_)
#pragma GCC diagnostic pop
#endif