Posix Tests Compiler Warnings v2
Sebastian Huber
sebastian.huber at embedded-brains.de
Thu Aug 22 07:32:31 UTC 2013
On 2013-08-22 08:11, Rempel, Cynthia wrote:
> @@ -50,7 +50,7 @@ void *Task_1_through_3(
> /* get id of this thread */
>
> Task_id = pthread_self();
> - printf( "Task_1: ID is 0x%08" PRIxpthread_t "\n", Task_id );
> + printf( "Task_1: ID is 0x%08" PRIx32 "\n", (uint32_t)Task_id );
This fixes the warning, but it doesn't fix the root cause. In tmacros.h we have
/* HACK: newlib defines pthread_t as a typedef to __uint32_t */
/* HACK: There is no portable way to print pthread_t's */
#define PRIxpthread_t PRIx32
The problem is that Newlibs __uint32_t is not the same type as uint32_t in general.
I prefer to keep the warning until this Newlib inconsistency is fixed.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
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