[libcalamares] Reduce warnings with Clang 9 (Boost::Python)
- The boost headers fall foul of tons of Clang warnings, so introduce a mechanism like moc-headers for turning off most of those warnings.
This commit is contained in:
parent
2e22bdd7dc
commit
ac75c63001
@ -26,8 +26,13 @@
|
||||
#include <QFileInfo>
|
||||
|
||||
#undef slots
|
||||
#include "utils/boost-warnings.h"
|
||||
#include <boost/python.hpp>
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
namespace bp = boost::python;
|
||||
|
||||
namespace CalamaresPython
|
||||
|
@ -25,10 +25,16 @@
|
||||
#include <QStringList>
|
||||
|
||||
#undef slots
|
||||
#include "utils/boost-warnings.h"
|
||||
|
||||
#include <boost/python/dict.hpp>
|
||||
#include <boost/python/list.hpp>
|
||||
#include <boost/python/object.hpp>
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
namespace CalamaresPython
|
||||
{
|
||||
|
||||
|
@ -32,8 +32,13 @@
|
||||
#include <QStandardPaths>
|
||||
|
||||
#undef slots
|
||||
#include "utils/boost-warnings.h"
|
||||
#include <boost/python.hpp>
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
namespace bp = boost::python;
|
||||
|
||||
static int
|
||||
|
8
src/libcalamares/utils/boost-warnings.h
Normal file
8
src/libcalamares/utils/boost-warnings.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wreserved-id-macro"
|
||||
#pragma clang diagnostic ignored "-Wold-style-cast"
|
||||
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
|
||||
#pragma clang diagnostic ignored "-Wextra-semi-stmt"
|
||||
#pragma clang diagnostic ignored "-Wall"
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user