diff --git a/src/libcalamares/PythonHelper.cpp b/src/libcalamares/PythonHelper.cpp index d6e61b3aa..ca004ab5f 100644 --- a/src/libcalamares/PythonHelper.cpp +++ b/src/libcalamares/PythonHelper.cpp @@ -26,6 +26,11 @@ namespace CalamaresPython boost::python::object variantToPyObject( const QVariant& variant ) { +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wswitch-enum" +#endif + // 49 enumeration values not handled switch ( variant.type() ) { case QVariant::Map: @@ -62,6 +67,9 @@ variantToPyObject( const QVariant& variant ) default: return bp::object(); } +#ifdef __clang__ +#pragma clang diagnostic pop +#endif } diff --git a/src/libcalamares/partition/FileSystem.cpp b/src/libcalamares/partition/FileSystem.cpp index ad4df31ed..0dcd6fd32 100644 --- a/src/libcalamares/partition/FileSystem.cpp +++ b/src/libcalamares/partition/FileSystem.cpp @@ -22,6 +22,11 @@ namespace Partition QString prettyNameForFileSystemType( FileSystem::Type t ) { +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wswitch-enum" +#endif + // 13 enumeration values not handled switch ( t ) { case FileSystem::Unknown: @@ -60,11 +65,19 @@ prettyNameForFileSystemType( FileSystem::Type t ) default: return FileSystem::nameForType( t ); } +#ifdef __clang__ +#pragma clang diagnostic pop +#endif } QString untranslatedFS( FileSystem::Type t ) { +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wswitch-enum" +#endif + // 34 enumeration values not handled switch ( t ) { case FileSystem::Type::ReiserFS: @@ -72,6 +85,9 @@ untranslatedFS( FileSystem::Type t ) default: return FileSystem::nameForType( t, { QStringLiteral( "C" ) } ); } +#ifdef __clang__ +#pragma clang diagnostic pop +#endif } } // namespace Partition