[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>
|
#include <QFileInfo>
|
||||||
|
|
||||||
#undef slots
|
#undef slots
|
||||||
|
#include "utils/boost-warnings.h"
|
||||||
#include <boost/python.hpp>
|
#include <boost/python.hpp>
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace bp = boost::python;
|
namespace bp = boost::python;
|
||||||
|
|
||||||
namespace CalamaresPython
|
namespace CalamaresPython
|
||||||
|
@ -25,10 +25,16 @@
|
|||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
#undef slots
|
#undef slots
|
||||||
|
#include "utils/boost-warnings.h"
|
||||||
|
|
||||||
#include <boost/python/dict.hpp>
|
#include <boost/python/dict.hpp>
|
||||||
#include <boost/python/list.hpp>
|
#include <boost/python/list.hpp>
|
||||||
#include <boost/python/object.hpp>
|
#include <boost/python/object.hpp>
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace CalamaresPython
|
namespace CalamaresPython
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -32,8 +32,13 @@
|
|||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
|
||||||
#undef slots
|
#undef slots
|
||||||
|
#include "utils/boost-warnings.h"
|
||||||
#include <boost/python.hpp>
|
#include <boost/python.hpp>
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace bp = boost::python;
|
namespace bp = boost::python;
|
||||||
|
|
||||||
static int
|
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