change log for rtems (2011-11-08)

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Nov 8 10:51:35 UTC 2011


On 11/08/2011 11:42 AM, Ralf Corsepius wrote:
> On 11/08/2011 11:10 AM, rtems-vc at rtems.org wrote:
>> *sh*
>>
>> 2011-11-08 Sebastian Huber<sebastian.huber at embedded-brains.de>
>
>
>> #ifndef LIBCPU_SHARED_UTILITY_H
>> @@ -25,13 +28,14 @@
>> #include<stdint.h>
>>
>> #define BSP_BIT8(bit) \
>> - ((uint8_t) (((uint8_t) 1)<< (bit)))
>> + ((uint8_t) (((unsigned int) 1)<< (bit)))
>
> What are you trying to achieve?

"(uint8_t) 1" is a nop here.

>
> To me, this change of yours seems just wrong and broken.

I think bit operations should be better done with unsigned types.  Instead of 
the cast we can also use "1U".

-- 
Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the vc mailing list