cast emUsbType to uint when compared with uint

uiSupportType is type uint. emUsbType defaults to int.
A logical OR will result in a uint. Therefore cast emUsbType
to uint to prevent following error with clang on OpenBSD

cc1plus: warnings being treated as errors
main.cpp: In function 'bool check_device_type(STRUCT_RKDEVICE_DESC&, UINT)':
main.cpp:835: warning: comparison between signed and unsigned integer expressions
*** Error 1 in . (Makefile:461 'main.o')
*** Error 1 in /root/rkdeveloptool (Makefile:506 'all-recursive')

Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
This commit is contained in:
Klaus Goger 2017-10-10 15:35:25 +02:00
parent 35a265bc44
commit 06ea143e09

View File

@ -832,7 +832,7 @@ int MakeIDBlockData(PBYTE pDDR, PBYTE pLoader, PBYTE lpIDBlock, USHORT usFlashDa
bool check_device_type(STRUCT_RKDEVICE_DESC &dev, UINT uiSupportType)
{
if ((dev.emUsbType & uiSupportType) == dev.emUsbType)
if (((UINT)dev.emUsbType & uiSupportType) == (UINT)dev.emUsbType)
return true;
else
{