[rtems commit] score: _Objects_Build_name() signed/unsigned char
Sebastian Huber
sebh at rtems.org
Wed Feb 3 05:17:34 UTC 2021
Module: rtems
Branch: master
Commit: 98549e452476d5e05a06f2861467b4cd7bef8181
Changeset: http://git.rtems.org/rtems/commit/?id=98549e452476d5e05a06f2861467b4cd7bef8181
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Feb 2 15:40:42 2021 +0100
score: _Objects_Build_name() signed/unsigned char
Change _Objects_Build_name() so that the result is independent of the
signedness of char.
Close #4228.
---
cpukit/include/rtems/score/object.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/cpukit/include/rtems/score/object.h b/cpukit/include/rtems/score/object.h
index 28a2140..c824332 100644
--- a/cpukit/include/rtems/score/object.h
+++ b/cpukit/include/rtems/score/object.h
@@ -242,10 +242,10 @@ typedef enum {
* @param[in] _C4 is the fourth character of the name
*/
#define _Objects_Build_name( _C1, _C2, _C3, _C4 ) \
- ( (uint32_t)(_C1) << 24 | \
- (uint32_t)(_C2) << 16 | \
- (uint32_t)(_C3) << 8 | \
- (uint32_t)(_C4) )
+ ( (uint32_t) (uint8_t) (_C1) << 24 | \
+ (uint32_t) (uint8_t) (_C2) << 16 | \
+ (uint32_t) (uint8_t) (_C3) << 8 | \
+ (uint8_t) (_C4) )
/**
* @brief Returns the API portion of the ID.
More information about the vc
mailing list