RTEMS printk fails for large unsigned integers

Sebastian Huber sebastian.huber at embedded-brains.de
Sun Nov 29 12:17:41 UTC 2009


Joris van Rantwijk wrote:
[...]
> Index: rtems/testsuites/sptests/spprintk/init.c
> ===================================================================
> RCS file: /usr1/CVS/rtems/testsuites/sptests/spprintk/init.c,v
> retrieving revision 1.5
> diff -c -3 -p -r1.5 init.c
> *** rtems/testsuites/sptests/spprintk/init.c    24 Oct 2009 06:14:30 
> -0000    1.5
> --- rtems/testsuites/sptests/spprintk/init.c    28 Nov 2009 17:38:22 
> -0000
> *************** rtems_task Init(
> *** 53,58 ****
> --- 53,62 ----
>     printk( "%%-4s of joel -- (%-4s)\n", "joel" );
>     printk( "%%c of X -- (%c)\n", 'X' );
>
> +   /* large unsigned numbers */
> +   printk( "%%u of 3000000000 -- %u\n", 3000000000U);
[...]

This will not work with 16-bit integers, but we may use INT_MAX.

-- 
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 users mailing list