[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haiku-development
Subject:    [haiku-development] Re: [hda] Duplicated condition
From:       waddlesplash <waddlesplash () gmail ! com>
Date:       2020-07-16 14:22:33
Message-ID: CAEesM75Z1EiXajr9D_ua5hWm9YPO5ZDEn-avkyV2rzF8994y=w () mail ! gmail ! com
[Download RAW message or body]

On Mon, Jul 13, 2020 at 11:56 AM M=C3=A1ximo Casta=C3=B1eda
<dmarc-noreply@freelists.org> wrote:
> I won't claim to know what the code is doing or supposed to do, just noti=
ced a warning that looks like a real error.
>
> -Wduplicated-cond warns about a sequence of tests in src/add-ons/kernel/d=
rivers/audio/hda/hda_multi_audio.cpp. The set_mix function contains somethi=
ng like:
>
> if mix_control has flag B_MULTI_MIX_ENABLE
> else if it has B_MULTI_MIX_GAIN
> else if it has B_MIX_MUX_MIXER
> else if it has B_MIX_MUX_SELECTOR
>
> But B_MIX_MUX_SELECTOR and B_MULTI_MIX_ENABLE are the same values.
>
> B_MIX_MUX_* are defined in an enum in hda_multi_audio.cpp itself. The B_M=
ULTI_* come from defines in headers/private/audio/hmulti_audio.h.

Well, certainly that does sound like a bug...

Unfortunately there are not many experts on these APIs around, as you
can see by the fact that nobody has yet replied. If you have time to
investigate, you may have success yourself? :)

-waddlesplash

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic