WSL2-Linux-Kernel/sound/i2c
Philipp Klocke eb7ebfa3c1 ALSA: i2c/cs8427: Fix int to char conversion
Compiling with clang yields the following warning:

sound/i2c/cs8427.c:140:31: warning: implicit conversion from 'int'
to 'char' changes value from 160 to -96 [-Wconstant-conversion]
    data[0] = CS8427_REG_AUTOINC | CS8427_REG_CORU_DATABUF;
            ~ ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~

Because CS8427_REG_AUTOINC is defined as 128, it is too big for a
char field.
So change data from char to unsigned char, that it can hold the value.

This patch does not change the generated code.

Signed-off-by: Philipp Klocke <philipp97kl@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-18 15:44:08 +02:00
..
other ALSA: i2c: Remove empty init and exit 2018-08-03 16:11:43 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cs8427.c ALSA: i2c/cs8427: Fix int to char conversion 2018-10-18 15:44:08 +02:00
i2c.c ALSA: i2c: Remove empty init and exit 2018-08-03 16:11:43 +02:00
tea6330t.c ALSA: i2c: Remove empty init and exit 2018-08-03 16:11:43 +02:00