mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2025-06-06 06:48:18 +08:00

* Change type of usGenerateChecksum's ulAlignBits to intptr_t Not all platforms have 32-bit pointers. 8-bit machines such as avr8 have 16-bit pointers. This patch changes the type of ulAlignBits and renames it to uxAlignBits to reflect the type change. This fixes a compiler warning on machines with pointers that aren't 32-bits. Signed-off-by: Andy Bennett <andyjpb@ashurst.eu.org> * Fix usGenerateChecksum on odd-aligned buffers with non zero usSum usGenerateChecksum would generate an incorrect checksum when pucNextData was odd-aligned and usSum was non-zero. This was caused by the byte order of usSum not matching the byte order of the subsequent summing operation. Odd-aligned buffers are common on 8-bit platforms such as avr8 when using one of the FreeRTOS dynamic heap allocators. Signed-off-by: Andy Bennett <andyjpb@ashurst.eu.org> * Feedback from PR#122 https://github.com/FreeRTOS/FreeRTOS/pull/122 + Use a uintptr_t rather than an intptr_t. Changes supplied by Hein Tibosch. Signed-off-by: Andy Bennett <andyjpb@ashurst.eu.org> Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>