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

Commit d995c018 authored by Colin Cross's avatar Colin Cross
Browse files

Fix warnings hidden by -isystem

Fix -Wundefined-var-template and -Wsign-compare warnings that were
hidden by the use of -isystem to include frameworks/av.

Test: m -j native
Bug: 31751828
Change-Id: I28e07b238d5bc913ea2f3dfa09fa02f577d5a250
parent fa382b71
Loading
Loading
Loading
Loading
+16 −1
Original line number Original line Diff line number Diff line
@@ -203,7 +203,8 @@ inline void TypeConverter<Traits>::maskToString(uint32_t mask, std::string &str,
    if (mask != 0) {
    if (mask != 0) {
        bool first_flag = true;
        bool first_flag = true;
        for (size_t i = 0; mTable[i].literal; i++) {
        for (size_t i = 0; mTable[i].literal; i++) {
            if (mTable[i].value != 0 && (mask & mTable[i].value) == mTable[i].value) {
            uint32_t value = static_cast<uint32_t>(mTable[i].value);
            if (mTable[i].value != 0 && ((mask & value) == value)) {
                if (!first_flag) str += del;
                if (!first_flag) str += del;
                first_flag = false;
                first_flag = false;
                str += mTable[i].literal;
                str += mTable[i].literal;
@@ -228,6 +229,20 @@ typedef TypeConverter<AudioModeTraits> AudioModeConverter;
typedef TypeConverter<UsageTraits> UsageTypeConverter;
typedef TypeConverter<UsageTraits> UsageTypeConverter;
typedef TypeConverter<SourceTraits> SourceTypeConverter;
typedef TypeConverter<SourceTraits> SourceTypeConverter;


template<> const OutputDeviceConverter::Table OutputDeviceConverter::mTable[];
template<> const InputDeviceConverter::Table InputDeviceConverter::mTable[];
template<> const OutputFlagConverter::Table OutputFlagConverter::mTable[];
template<> const InputFlagConverter::Table InputFlagConverter::mTable[];
template<> const FormatConverter::Table FormatConverter::mTable[];
template<> const OutputChannelConverter::Table OutputChannelConverter::mTable[];
template<> const InputChannelConverter::Table InputChannelConverter::mTable[];
template<> const ChannelIndexConverter::Table ChannelIndexConverter::mTable[];
template<> const GainModeConverter::Table GainModeConverter::mTable[];
template<> const StreamTypeConverter::Table StreamTypeConverter::mTable[];
template<> const AudioModeConverter::Table AudioModeConverter::mTable[];
template<> const UsageTypeConverter::Table UsageTypeConverter::mTable[];
template<> const SourceTypeConverter::Table SourceTypeConverter::mTable[];

bool deviceFromString(const std::string& literalDevice, audio_devices_t& device);
bool deviceFromString(const std::string& literalDevice, audio_devices_t& device);


bool deviceToString(audio_devices_t device, std::string& literalDevice);
bool deviceToString(audio_devices_t device, std::string& literalDevice);
+9 −0
Original line number Original line Diff line number Diff line
@@ -49,4 +49,13 @@ typedef TypeConverter<MixTypeTraits> MixTypeConverter;
typedef TypeConverter<RouteFlagTraits> RouteFlagTypeConverter;
typedef TypeConverter<RouteFlagTraits> RouteFlagTypeConverter;
typedef TypeConverter<RuleTraits> RuleTypeConverter;
typedef TypeConverter<RuleTraits> RuleTypeConverter;


template <>
const DeviceCategoryConverter::Table DeviceCategoryConverter::mTable[];
template <>
const MixTypeConverter::Table MixTypeConverter::mTable[];
template <>
const RouteFlagTypeConverter::Table RouteFlagTypeConverter::mTable[];
template <>
const RuleTypeConverter::Table RuleTypeConverter::mTable[];

}; // namespace android
}; // namespace android