Reduce warnings for yaml-cpp
- Use only utils/YamlUtils.h to pull in yaml-cpp and supporting code. - When compiling with clang, turn off warnings that the system header for yaml-cpp would generate.
This commit is contained in:
parent
27140ff5bb
commit
c83395ff6d
@ -27,8 +27,6 @@
|
|||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QPair>
|
#include <QPair>
|
||||||
|
|
||||||
#include <yaml-cpp/yaml.h>
|
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
hasValue( const YAML::Node& v )
|
hasValue( const YAML::Node& v )
|
||||||
{
|
{
|
||||||
|
@ -20,8 +20,6 @@
|
|||||||
|
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
|
|
||||||
#include <yaml-cpp/yaml.h>
|
|
||||||
|
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
@ -26,11 +26,21 @@
|
|||||||
class QByteArray;
|
class QByteArray;
|
||||||
class QFileInfo;
|
class QFileInfo;
|
||||||
|
|
||||||
namespace YAML
|
// The yaml-cpp headers are not C++11 warning-proof, especially
|
||||||
{
|
// with picky compilers like Clang 8. Since we use Clang for the
|
||||||
class Node;
|
// find-all-the-warnings case, switch those warnings off for
|
||||||
class Exception;
|
// the we-can't-change-them system headers.
|
||||||
}
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
|
||||||
|
#pragma clang diagnostic ignored "-Wshadow"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <yaml-cpp/yaml.h>
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
/// @brief Appends all te elements of @p node to the string list @p v
|
/// @brief Appends all te elements of @p node to the string list @p v
|
||||||
void operator>>( const YAML::Node& node, QStringList& v );
|
void operator>>( const YAML::Node& node, QStringList& v );
|
||||||
|
@ -32,9 +32,6 @@
|
|||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QVariantMap>
|
#include <QVariantMap>
|
||||||
|
|
||||||
#include <yaml-cpp/yaml.h>
|
|
||||||
|
|
||||||
|
|
||||||
namespace Calamares
|
namespace Calamares
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -36,8 +36,6 @@
|
|||||||
#include "PythonQtViewModule.h"
|
#include "PythonQtViewModule.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <yaml-cpp/yaml.h>
|
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
@ -28,8 +28,6 @@
|
|||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
#include "utils/YamlUtils.h"
|
#include "utils/YamlUtils.h"
|
||||||
|
|
||||||
#include <yaml-cpp/yaml.h>
|
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
@ -22,8 +22,6 @@
|
|||||||
#include "utils/CommandList.h"
|
#include "utils/CommandList.h"
|
||||||
#include "utils/YamlUtils.h"
|
#include "utils/YamlUtils.h"
|
||||||
|
|
||||||
#include <yaml-cpp/yaml.h>
|
|
||||||
|
|
||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
|
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
@ -25,8 +25,6 @@
|
|||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
#include "utils/YamlUtils.h"
|
#include "utils/YamlUtils.h"
|
||||||
|
|
||||||
#include <yaml-cpp/yaml.h>
|
|
||||||
|
|
||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
|
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
@ -25,8 +25,6 @@
|
|||||||
|
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
|
|
||||||
#include <yaml-cpp/yaml.h>
|
|
||||||
|
|
||||||
GeoIPJSON::GeoIPJSON(const QString& attribute)
|
GeoIPJSON::GeoIPJSON(const QString& attribute)
|
||||||
: GeoIP( attribute.isEmpty() ? QStringLiteral( "time_zone" ) : attribute )
|
: GeoIP( attribute.isEmpty() ? QStringLiteral( "time_zone" ) : attribute )
|
||||||
{
|
{
|
||||||
|
@ -42,8 +42,6 @@
|
|||||||
#include <QNetworkReply>
|
#include <QNetworkReply>
|
||||||
#include <QtConcurrent/QtConcurrentRun>
|
#include <QtConcurrent/QtConcurrentRun>
|
||||||
|
|
||||||
#include <yaml-cpp/yaml.h>
|
|
||||||
|
|
||||||
|
|
||||||
CALAMARES_PLUGIN_FACTORY_DEFINITION( LocaleViewStepFactory, registerPlugin<LocaleViewStep>(); )
|
CALAMARES_PLUGIN_FACTORY_DEFINITION( LocaleViewStepFactory, registerPlugin<LocaleViewStep>(); )
|
||||||
|
|
||||||
|
@ -36,8 +36,6 @@
|
|||||||
|
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
|
|
||||||
#include <yaml-cpp/yaml.h>
|
|
||||||
|
|
||||||
using CalamaresUtils::yamlToVariant;
|
using CalamaresUtils::yamlToVariant;
|
||||||
|
|
||||||
NetInstallPage::NetInstallPage( QWidget* parent )
|
NetInstallPage::NetInstallPage( QWidget* parent )
|
||||||
|
@ -27,7 +27,10 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
#include <yaml-cpp/yaml.h>
|
namespace YAML
|
||||||
|
{
|
||||||
|
class Node;
|
||||||
|
}
|
||||||
|
|
||||||
class PackageModel : public QAbstractItemModel
|
class PackageModel : public QAbstractItemModel
|
||||||
{
|
{
|
||||||
|
@ -26,8 +26,6 @@
|
|||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
#include "utils/YamlUtils.h"
|
#include "utils/YamlUtils.h"
|
||||||
|
|
||||||
#include <yaml-cpp/yaml.h>
|
|
||||||
|
|
||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
|
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
@ -21,13 +21,13 @@
|
|||||||
* shipped with each module for correctness -- well, for parseability.
|
* shipped with each module for correctness -- well, for parseability.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "utils/YamlUtils.h"
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include <yaml-cpp/yaml.h>
|
|
||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user