[PATCH 3/6] gen5200/mscan/mscan.c: Fix printf() format warning

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Oct 8 13:30:28 UTC 2018



On 08/10/2018 15:26, Joel Sherrill wrote:
> ---
>   bsps/powerpc/gen5200/mscan/mscan.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/bsps/powerpc/gen5200/mscan/mscan.c b/bsps/powerpc/gen5200/mscan/mscan.c
> index e36b622..ef1809e 100644
> --- a/bsps/powerpc/gen5200/mscan/mscan.c
> +++ b/bsps/powerpc/gen5200/mscan/mscan.c
> @@ -748,7 +748,7 @@ rtems_status_code mscan_channel_initialize(rtems_device_major_number major,
>   
>     /* Set up interrupts */
>     if (!BSP_install_rtems_irq_handler(&(mpc5200_mscan_irq_data[minor])))
> -    rtems_panic("Can't attach MPC5x00 MSCAN interrupt handler %d\n", minor);
> +    rtems_panic("Can't attach MPC5x00 MSCAN interrupt handler %ld\n", minor);
>   
>     /* basic setup for channel info. struct. */
>     chan->regs = (mscan *) &(mpc5200.mscan[minor]);

This is not the right format specifier, the rtems_device_minor_number is 
uint32_t, so you need PRIu32.

-- 
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