]> code.delx.au - pulseaudio/commit
alsa-mixer: Get rid of a compiler warning.
authorTanu Kaskinen <tanuk@iki.fi>
Sun, 27 Mar 2011 18:35:03 +0000 (21:35 +0300)
committerColin Guthrie <colin@mageia.org>
Mon, 28 Mar 2011 08:52:55 +0000 (09:52 +0100)
commit77da2c4bcf843980fe27d4878a468741bdad3a38
tree773697292a73733510c325dd571bcd7a4f355509
parent60f191941b628947398207a26a2f6a3c463db7bb
alsa-mixer: Get rid of a compiler warning.

On 64-bit systems LONG_MAX is greater than the largest possible value of a
uint32_t variable, which caused the compiler to warn about a comparison that is
always false. On 32-bit systems pa_atou() can return a value that will overflow
when assigned to e->volume_limit, which has type long, so the comparison was
necessary.

This dilemma is resolved by using pa_atol() instead of pa_atou().
src/modules/alsa/alsa-mixer.c
src/pulsecore/core-util.c
src/pulsecore/core-util.h