CMake: restore NOTREACHED, without the macro-mess

- gcc (up to at least version 10) is worse at recognizing that all
  cases have been handled, so it complains about all the switches
  that cover enum values.
main
Adriaan de Groot 4 years ago
parent fea403186f
commit 98c7cec732

@ -271,6 +271,7 @@ flavoredWidget( Calamares::Branding::PanelFlavor flavor,
case Calamares::Branding::PanelFlavor::None:
return nullptr;
}
__builtin_unreachable();
}
/** @brief Adds widgets to @p layout if they belong on this @p side

@ -139,6 +139,7 @@ PartitionSize::toBytes( qint64 totalSectors, qint64 sectorSize ) const
case SizeUnit::GiB:
return toBytes();
}
__builtin_unreachable();
}
qint64
@ -175,7 +176,7 @@ PartitionSize::toBytes( qint64 totalBytes ) const
case SizeUnit::GiB:
return toBytes();
}
__builtin_unreachable();
}
qint64
@ -206,6 +207,7 @@ PartitionSize::toBytes() const
case SizeUnit::GiB:
return CalamaresUtils::GiBtoBytes( static_cast< unsigned long long >( value() ) );
}
__builtin_unreachable();
}
bool
@ -231,6 +233,7 @@ PartitionSize::operator<( const PartitionSize& other ) const
case SizeUnit::GiB:
return ( toBytes() < other.toBytes() );
}
__builtin_unreachable();
}
bool
@ -256,6 +259,7 @@ PartitionSize::operator>( const PartitionSize& other ) const
case SizeUnit::GiB:
return ( toBytes() > other.toBytes() );
}
__builtin_unreachable();
}
bool
@ -281,6 +285,7 @@ PartitionSize::operator==( const PartitionSize& other ) const
case SizeUnit::GiB:
return ( toBytes() == other.toBytes() );
}
__builtin_unreachable();
}
} // namespace Partition

@ -52,6 +52,7 @@ yamlToVariant( const YAML::Node& node )
case YAML::NodeType::Undefined:
return QVariant();
}
__builtin_unreachable();
}

@ -43,6 +43,7 @@ Config::status() const
case Status::FailedNetworkError:
return tr( "Network Installation. (Disabled: Unable to fetch package lists, check your network connection)" );
}
__builtin_unreachable();
}

@ -110,6 +110,7 @@ PackageChooserViewStep::isNextEnabled() const
// exactly one OR one or more
return m_widget->hasSelection();
}
__builtin_unreachable();
}

Loading…
Cancel
Save