From 77da2c4bcf843980fe27d4878a468741bdad3a38 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Sun, 27 Mar 2011 21:35:03 +0300 Subject: 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/pulsecore/core-util.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/pulsecore/core-util.h') diff --git a/src/pulsecore/core-util.h b/src/pulsecore/core-util.h index 32641a3f..0b34a183 100644 --- a/src/pulsecore/core-util.h +++ b/src/pulsecore/core-util.h @@ -135,6 +135,7 @@ char *pa_state_path(const char *fn, pa_bool_t prepend_machine_id); int pa_atoi(const char *s, int32_t *ret_i); int pa_atou(const char *s, uint32_t *ret_u); +int pa_atol(const char *s, long *ret_l); int pa_atod(const char *s, double *ret_d); size_t pa_snprintf(char *str, size_t size, const char *format, ...); -- cgit