HAL_SMACCM: fixed build warning

This commit is contained in:
Andrew Tridgell 2013-01-10 16:29:46 +11:00
parent 130aaae168
commit 63634c4e8a

View File

@ -155,10 +155,10 @@ bool SMACCMConsoleDriver::Buffer::allocate(uint16_t size)
uint8_t shift;
/* Hardcoded max size of 1024. sue me. */
for ( shift = 1;
( 1 << shift ) < 1024 && ( 1 << shift) < size;
( 1U << shift ) < 1024 && ( 1U << shift) < size;
shift++
) ;
uint16_t tmpmask = (1 << shift) - 1;
uint16_t tmpmask = (1U << shift) - 1;
if ( _bytes != NULL ) {
if ( _mask == tmpmask ) {