mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
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().
This commit is contained in:
parent
60f191941b
commit
77da2c4bcf
3 changed files with 26 additions and 10 deletions
|
|
@ -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, ...);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue