Skip to content

Commit

Permalink
Silence implicit fallthrough warning on newer GCC versions. (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
esabol authored Nov 20, 2022
1 parent 8ee249b commit c5bfad1
Showing 1 changed file with 13 additions and 0 deletions.
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

0 comments on commit c5bfad1

Please sign in to comment.