[alsa-devel] [PATCH] gcc6 narrowing error

Clemens Ladisch clemens at ladisch.de
Tue Jun 21 13:21:40 CEST 2016


Michel Normand wrote:
> [   51s] Cus428Midi.cc:83:1: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
>
> -	-1, -1, -1, -1, -1, -1
> +	(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1

The warning is wrong, because the value is a constant that fits into the
narrower type.


Regards,
Clemens


More information about the Alsa-devel mailing list