Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae461e07 authored by Yi Kong's avatar Yi Kong Committed by Android (Google) Code Review
Browse files

Merge "Suppress null-dereference warning temporarily"

parents cccfb3fe 103639a8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -988,7 +988,10 @@ struct C2FieldDescriptor {
    /** specialization for easy enums */
    template<typename E>
    inline static NamedValuesType namedValuesFor(const C2EasyEnum<E> &) {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnull-dereference"
        return namedValuesFor(*(E*)nullptr);
#pragma GCC diagnostic pop
    }

private:
@@ -1104,7 +1107,10 @@ struct C2FieldDescriptor::_NamedValuesGetter<B, false> {
template<typename B>
struct C2FieldDescriptor::_NamedValuesGetter<B, true> {
    inline static C2FieldDescriptor::NamedValuesType getNamedValues() {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnull-dereference"
        return C2FieldDescriptor::namedValuesFor(*(B*)nullptr);
#pragma GCC diagnostic pop
    }
};