andysworkshop / stm32plus

The C++ library for the STM32 F0, F100, F103, F107 and F4 microcontrollers
http://www.andybrown.me.uk
Other
745 stars 224 forks source link

compiler error on MscScsi.h #146

Closed hellow554 closed 8 years ago

hellow554 commented 8 years ago

https://github.com/andysworkshop/stm32plus/blob/master/lib/include/usb/device/msc/MscScsi.h#L512

In file included from lib/include/config/usb/device/msc.h:46:0,
                 from examples/usb_device_msc_internal/usb_device_msc_internal.cpp:8:
lib/include/usb/device/msc/MscScsi.h: In member function 'bool stm32plus::usb::MscScsi<TInEndpointAddress, TOutEndpointAddress>::read10(uint8_t, uint8_t*, stm32plus::usb::MscBotCommandBlockWrapper&, stm32plus::usb::MscBotCommandStatusWrapper&)':
lib/include/usb/device/msc/MscScsi.h:512:52: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses]
         if(!checkAddressRange(lun,_blkAddr,_blkLen)<0)

checkAddressRange returns a bool and not an int. Because I don't know how this is meant to be, i open this issue, instead of fixing it directly

andysworkshop commented 8 years ago

Fixed. It was an oversight of mine during the port of ST's driver code.