linux/samples/vfio-mdev
Nathan Chancellor 8ba35b3a00 vfio-mdev/samples: Use u8 instead of char for handle functions
Clang warns:

samples/vfio-mdev/mtty.c:592:39: warning: implicit conversion from 'int'
to 'char' changes value from 162 to -94 [-Wconstant-conversion]
                *buf = UART_MSR_DSR | UART_MSR_DDSR | UART_MSR_DCD;
                     ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
1 warning generated.

Turns out that all uses of buf in this function ultimately end up stored
or cast to an unsigned type. Just use u8, which has the same number of
bits but can store this larger number so Clang no longer warns.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2018-12-17 11:07:13 -07:00
..
Makefile sample: vfio bochs vbe display (host device for bochs-drm) 2018-06-08 10:24:16 -06:00
mbochs.c vfio: add edid support to mbochs sample driver 2018-10-11 10:22:36 -06:00
mdpy-defs.h sample: vfio mdev display - host device 2018-06-08 10:24:09 -06:00
mdpy-fb.c sample: vfio mdev display - guest driver 2018-06-08 10:24:13 -06:00
mdpy.c sample: vfio mdev display - host device 2018-06-08 10:24:09 -06:00
mtty.c vfio-mdev/samples: Use u8 instead of char for handle functions 2018-12-17 11:07:13 -07:00