[RTEMS Project] #4228: rtems_build_name() depends on the signedness of char type

RTEMS trac trac at rtems.org
Tue Feb 2 14:35:43 UTC 2021


#4228: rtems_build_name() depends on the signedness of char type
------------------------------+-----------------------------
  Reporter:  Sebastian Huber  |      Owner:  Sebastian Huber
      Type:  defect           |     Status:  assigned
  Priority:  normal           |  Milestone:  6.1
 Component:  rtems            |    Version:
  Severity:  normal           |   Keywords:
Blocked By:                   |   Blocking:
------------------------------+-----------------------------
 The rtems_build_name() is implemented by:
 {{{!c
 #define  _Objects_Build_name( _C1, _C2, _C3, _C4 ) \
   ( (uint32_t)(_C1) << 24 | \
     (uint32_t)(_C2) << 16 | \
     (uint32_t)(_C3) << 8 | \
     (uint32_t)(_C4) )
 }}}
 If the name is build from four "char" components, then the result depends
 on the signedness of the char type. The macro should first cast the chars
 to uint8_t.

--
Ticket URL: <http://devel.rtems.org/ticket/4228>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list