#1531 closed defect (fixed)

ALIGN() should use uintptr_t

Reported by: Joel Sherrill Owned by: Ralf Corsepius
Priority: normal Milestone: 4.11
Component: tool/newlib Version: 4.11
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description (last modified by Joel Sherrill)

I got this failure on m32c/m32csim.

../../../../../../rtems/c/src/../../cpukit/libmisc/shell/fts.c: In function 'fts_alloc':
../../../../../../rtems/c/src/../../cpukit/libmisc/shell/fts.c:1058: error: cast to pointer from integer of different size

I tracked it down to this definition in machine/param.h

#define ALIGN(p) (((unsigned)(p) + ALIGNBYTES) & ~ALIGNBYTES)

The unsigned should be a uintptr_t.

Change History (3)

comment:1 Changed on Jun 14, 2010 at 7:33:45 PM by Joel Sherrill

Resolution: fixed
Status: newclosed

Resolved with local change to fts.c.

comment:2 Changed on Nov 22, 2014 at 11:51:55 PM by Joel Sherrill

Description: modified (diff)
Milestone: 24.11

This is still the definition of ALIGN in RTEMS' sys/param.h in newlib. The line of code hasn't changed since 2002. But the warning is no longer present. I had a build from overnight and double checking. Based on when this was filed, it would most likely be a 4.11 milestone.

comment:3 Changed on Nov 23, 2014 at 7:12:32 PM by Joel Sherrill

Version: unknown4.11
Note: See TracTickets for help on using tickets.