mirror of
https://github.com/sharkcz/rkdeveloptool.git
synced 2024-11-22 14:06:47 +01:00
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:
parent
35a265bc44
commit
06ea143e09
2
main.cpp
2
main.cpp
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user