Opened 8 years ago
Closed 8 years ago
#12826 closed bug (fixed)
[Patch] echo/multi.cpp: Fix clang warnings
Reported by: | mt | Owned by: | Barrett |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Drivers/Audio/Echo3g | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
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) { ~~ ^ ~
Attachments (1)
Change History (4)
by , 8 years ago
Attachment: | 0013-multi.cpp-Fix-clang-warnings.patch added |
---|
comment:1 by , 8 years ago
patch: | 0 → 1 |
---|
comment:2 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Applied in hrev50375.