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

Commit 189f0dfb authored by Yi Kong's avatar Yi Kong
Browse files

[DO NOT MERGE] Fix enum-compare-switch warning

Comparing 'android::C2FieldDescriptor::Type' and 'android::C2Value::Type'
is wrong.

Found by -Wenum-compare-switch.

Bug: 72330874
Test: m
Change-Id: I14a1389ac21e60fbd46e875c4387be9b349137ed
parent 9f877cf5
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -2479,11 +2479,11 @@ void dumpStruct(const C2StructDescriptor &sd) {
            for (const FD::named_value_type &p : f.namedValues()) {
                cout << sep << p.first << "=";
                switch (f.type()) {
                case C2Value::INT32: cout << get(p.second, (int32_t *)0); break;
                case C2Value::INT64: cout << get(p.second, (int64_t *)0); break;
                case C2Value::UINT32: cout << get(p.second, (uint32_t *)0); break;
                case C2Value::UINT64: cout << get(p.second, (uint64_t *)0); break;
                case C2Value::FLOAT: cout << get(p.second, (float *)0); break;
                case C2FieldDescriptor::INT32: cout << get(p.second, (int32_t *)0); break;
                case C2FieldDescriptor::INT64: cout << get(p.second, (int64_t *)0); break;
                case C2FieldDescriptor::UINT32: cout << get(p.second, (uint32_t *)0); break;
                case C2FieldDescriptor::UINT64: cout << get(p.second, (uint64_t *)0); break;
                case C2FieldDescriptor::FLOAT: cout << get(p.second, (float *)0); break;
                default: cout << "???"; break;
                }
                sep = ",";