[PATCH] score: Change _Heap_Extend() API

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Aug 10 08:59:12 UTC 2012

On 08/09/2012 05:50 PM, Joel Sherrill wrote:
> Sorry to keep pestering but we ended up with a deliberately unused
> parameter. Does that give a warning?

With the standard warning flags "-Wall -Wmissing-prototypes 
-Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs" I get no 

> Do we need to use the gcc pragma to note it is unused? I know in the
> test code, there is a conditional defined for this. It may have to move
> into the core like the memory barrier and other compiler specific macros

There are a lot of __attribute__((unused)) scattered around the code.

We should think about using something similar to the FreeBSD cdefs.h file. 
They do a lot to cope with compiler dependencies, e.g.

#if __GNUC_PREREQ__(2, 7)
#define	__dead2		__attribute__((__noreturn__))
#define	__pure2		__attribute__((__const__))
#define	__unused	__attribute__((__unused__))
#define	__used		__attribute__((__used__))
#define	__packed	__attribute__((__packed__))
#define	__aligned(x)	__attribute__((__aligned__(x)))
#define	__section(x)	__attribute__((__section__(x)))

This is a lot shorter than the RTEMS_ATTRIBUTE_XXX.

Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

More information about the devel mailing list