[PATCH] cpukit/include/dev/can: Disabled debug prints in CAN Framework

Prashanth S fishesprashanth at gmail.com
Fri Dec 2 00:31:35 UTC 2022


>The CAN bus changes have warnings ...
>
>In file included from ../../../cpukit/include/dev/can/canqueueimpl.h:48,
>                from ../../../cpukit/dev/can/can.c:45:
>../../../cpukit/dev/can/can.c: In function 'can_bus_read':
>../../../cpukit/dev/can/can.c:213:15: warning: format '%u' expects
argument of
>type 'unsigned int', but argument 2 has type 'long unsigned int'
[-Wformat=]
>  213 |     CAN_DEBUG("can_bus_read: buffer size is small min sizeof(struct
>can_msg) = %u\n",
>      |
>^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  214 |                     sizeof(struct can_msg));
>      |                     ~~~~~~~~~~~~~~~~~~~~~~
>      |                     |
>      |                     long unsigned int
>../../../cpukit/include/dev/can/can.h:53:14: note: in definition of macro
>
>etc etc etc
>
>Can these please be fixed? Use #4662.

Yes, I will typecast the value returned by sizeof().


Regards
Prashanth S

On Fri, 2 Dec 2022 at 09:09, Chris Johns <chrisj at rtems.org> wrote:

> The CAN bus changes have warnings ...
>
> In file included from ../../../cpukit/include/dev/can/canqueueimpl.h:48,
>                  from ../../../cpukit/dev/can/can.c:45:
> ../../../cpukit/dev/can/can.c: In function 'can_bus_read':
> ../../../cpukit/dev/can/can.c:213:15: warning: format '%u' expects
> argument of
> type 'unsigned int', but argument 2 has type 'long unsigned int'
> [-Wformat=]
>   213 |     CAN_DEBUG("can_bus_read: buffer size is small min sizeof(struct
> can_msg) = %u\n",
>       |
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   214 |                     sizeof(struct can_msg));
>       |                     ~~~~~~~~~~~~~~~~~~~~~~
>       |                     |
>       |                     long unsigned int
> ../../../cpukit/include/dev/can/can.h:53:14: note: in definition of macro
>
> etc etc etc
>
> Can these please be fixed? Use #4662.
>
> Thanks
> Chris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20221202/9b37963b/attachment-0001.htm>


More information about the devel mailing list