[PATCH 5/6] alsa-mixer: Use pa_assert_not_reached()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ack

On 2014-11-09 17:59, Peter Meerwald wrote:
> get rid of the following warning when compiling with NDEBUG:
>
> modules/alsa/alsa-mixer.c: In function 'element_is_subset':
> modules/alsa/alsa-mixer.c:3125:18: warning: 'a_limit' may be used uninitialized in this function [-Wmaybe-uninitialized]
>               long a_limit;
>
> Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
> ---
>   src/modules/alsa/alsa-mixer.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
> index 8b23d90..b5d6276 100644
> --- a/src/modules/alsa/alsa-mixer.c
> +++ b/src/modules/alsa/alsa-mixer.c
> @@ -3155,8 +3155,7 @@ static bool element_is_subset(pa_alsa_element *a, pa_alsa_element *b, snd_mixer_
>               else if (a->volume_use == PA_ALSA_VOLUME_MERGE)
>                   a_limit = a->volume_limit;
>               else
> -                /* This should never be reached */
> -                pa_assert(false);
> +                pa_assert_not_reached();
>
>               if (a_limit > b->volume_limit)
>                   return false;
>

-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux