mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
Get rid of some warnings: -Wunsafe-loop-optimizations
pulsecore/core-util.c: In function ‘pa_hexstr’: pulsecore/core-util.c:1858: warning: cannot optimize loop, the loop counter may overflow [-Wunsafe-loop-optimizations] modules/alsa/alsa-mixer.c: In function ‘pa_alsa_decibel_fix_dump’: modules/alsa/alsa-mixer.c:3678: warning: cannot optimize possibly infinite loops [-Wunsafe-loop-optimizations] modules/alsa/alsa-mixer.c: In function ‘pa_alsa_path_set_new’: modules/alsa/alsa-mixer.c:2640: warning: cannot optimize loop, the loop counter may overflow [-Wunsafe-loop-optimizations]
This commit is contained in:
parent
33a88fbfde
commit
7c011e7688
2 changed files with 8 additions and 8 deletions
|
|
@ -1823,7 +1823,7 @@ char *pa_hexstr(const uint8_t* d, size_t dlength, char *s, size_t slength) {
|
|||
pa_assert(s);
|
||||
pa_assert(slength > 0);
|
||||
|
||||
while (i < dlength && j+3 <= slength) {
|
||||
while (j+2 < slength && i < dlength) {
|
||||
s[j++] = hex[*d >> 4];
|
||||
s[j++] = hex[*d & 0xF];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue