Re: [pulseaudio-discuss] [PATCH] alsa-mixer: Get rid of a compiler warning.
'Twas brillig, and Tanu Kaskinen at 27/03/11 19:35 did gyre and gimble: 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. Thanks. Merged in my tree. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contributor [http://www.mageia.org/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/] ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] [PATCH] alsa-mixer: Get rid of a compiler warning.
On Sun, 2011-03-27 at 21:20 +0300, Tanu Kaskinen wrote: @@ -2018,14 +2018,8 @@ int pa_atoi(const char *s, int32_t *ret_i) { pa_assert(s); pa_assert(ret_i); -errno = 0; -l = strtol(s, x, 0); - -if (!x || *x || errno) { -if (!errno) -errno = EINVAL; +if (pa_atol(s, l) 0) return -1; -} if ((int32_t) l != l) { errno = ERANGE; Damn, this causes another warning: x is now an unused variable. Fixup coming... -- Tanu ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss