Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#4228 closed defect (fixed)

rtems_build_name() depends on the signedness of char type

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 6.1
Component: rtems Version:
Severity: normal Keywords: qualification
Cc: Blocked By:
Blocking:

Description

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.

Change History (2)

comment:1 Changed on 02/03/21 at 05:17:44 by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: assignedclosed

In [changeset:"98549e452476d5e05a06f2861467b4cd7bef8181/rtems" 98549e45/rtems]:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems.git does not appear to be a Git repository.

comment:2 Changed on 06/23/21 at 07:07:55 by Sebastian Huber

Keywords: qualification added
Note: See TracTickets for help on using tickets.