#12826: [Patch] echo/multi.cpp: Fix clang warnings
----------------------------------+------------------------------
Reporter: mt | Owner: korli
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: Drivers/Audio/Echo3g | Version: R1/Development
Keywords: | Blocked By:
Blocking: | Has a Patch: 0
Platform: All |
----------------------------------+------------------------------
Clang warns 'id < 0' conditons. Since multi_mix_value_info->values[i].id
is int32 [1], so I think we may change variable 'id' from uint32 to int32.
And I think other audio drivers also need to change.
[1] http://cgit.haiku-
os.org/haiku/tree/headers/private/media/hmulti_audio.h#n427
{{{
/home/haiku/haiku/haiku/src/add-
ons/kernel/drivers/audio/echo/multi.cpp:258:10: warning: comparison of
unsigned expression < 0 is always false [-Wtautological-compare]
if (id < 0 || id >= card->multi.control_count) {
~~ ^ ~
/home/haiku/haiku/haiku/src/add-
ons/kernel/drivers/audio/echo/multi.cpp:300:10: warning: comparison of
unsigned expression < 0 is always false [-Wtautological-compare]
if (id < 0 || id >= card->multi.control_count) {
~~ ^ ~
/home/haiku/haiku/haiku/src/add-
ons/kernel/drivers/audio/echo/multi.cpp:311:12: warning: comparison of
unsigned expression < 0 is always false [-Wtautological-compare]
if (id < 0 || id >=
card->multi.control_count) {
~~ ^ ~
}}}
--
Ticket URL: <https://dev.haiku-os.org/ticket/12826>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.