build: fix some compiler warnings
This commit is contained in:
@ -129,6 +129,8 @@ struct Contact {
|
||||
* @return the field-id or Nothing.
|
||||
*/
|
||||
constexpr Option<Field::Id> field_id() const noexcept {
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wswitch-enum"
|
||||
switch(type) {
|
||||
case Type::Bcc:
|
||||
return Field::Id::Bcc;
|
||||
@ -141,6 +143,7 @@ struct Contact {
|
||||
default:
|
||||
return Nothing;
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
|
||||
@ -167,6 +170,8 @@ private:
|
||||
constexpr Option<Contact::Type>
|
||||
contact_type_from_field_id(Field::Id id) noexcept {
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wswitch-enum"
|
||||
switch(id) {
|
||||
case Field::Id::Bcc:
|
||||
return Contact::Type::Bcc;
|
||||
@ -179,6 +184,7 @@ contact_type_from_field_id(Field::Id id) noexcept {
|
||||
default:
|
||||
return Nothing;
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
using Contacts = std::vector<Contact>;
|
||||
|
||||
@ -490,6 +490,9 @@ handle_object(const MimeObject& parent,
|
||||
info.flags |= Flags::Encrypted;
|
||||
} else if (obj.is_mime_application_pkcs7_mime()) {
|
||||
MimeApplicationPkcs7Mime smime(obj);
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wswitch-enum"
|
||||
// CompressedData, CertsOnly, Unknown
|
||||
switch (smime.smime_type()) {
|
||||
case Mu::MimeApplicationPkcs7Mime::SecureMimeType::SignedData:
|
||||
info.flags |= Flags::Signed;
|
||||
@ -500,6 +503,7 @@ handle_object(const MimeObject& parent,
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
}
|
||||
|
||||
@ -718,6 +722,7 @@ fill_document(Message::Private& priv)
|
||||
break;
|
||||
/* LCOV_EXCL_START */
|
||||
case Field::Id::_count_:
|
||||
default:
|
||||
break;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
@ -331,6 +331,7 @@ address_type(Contact::Type ctype)
|
||||
return GMIME_ADDRESS_TYPE_REPLY_TO;
|
||||
case Contact::Type::Sender:
|
||||
return GMIME_ADDRESS_TYPE_SENDER;
|
||||
case Contact::Type::None:
|
||||
default:
|
||||
return Nothing;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user