Created
April 9, 2024 20:06
-
-
Save valmat/7d971561c36aa041e187b926ff84250a to your computer and use it in GitHub Desktop.
Suppress warnings for a library (example)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
// Suppress warnings for AMQP-CPP | |
#if defined(__clang__) | |
#pragma clang diagnostic push | |
#pragma clang diagnostic ignored "-Wunused-parameter" | |
#pragma clang diagnostic ignored "-Wclass-conversion" | |
#pragma clang diagnostic ignored "-Wdeprecated-copy" | |
#include <amqpcpp.h> | |
#include <amqpcpp/libev.h> | |
#pragma clang diagnostic pop | |
#elif defined(__GNUC__) || defined(__GNUG__) | |
#pragma GCC diagnostic push | |
#pragma GCC diagnostic ignored "-Wunused-parameter" | |
#pragma GCC diagnostic ignored "-Wclass-conversion" | |
#pragma GCC diagnostic ignored "-Wdeprecated-copy" | |
#include <amqpcpp.h> | |
#include <amqpcpp/libev.h> | |
#pragma GCC diagnostic pop | |
#else | |
#include <amqpcpp.h> | |
#include <amqpcpp/libev.h> | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment