[PATCH] Update:Change format specifiers to fix 4 warnings.
Joel Sherrill
joel at rtems.org
Fri Apr 7 15:17:55 UTC 2017
On Fri, Apr 7, 2017 at 9:58 AM, Gedare Bloom <gedare at rtems.org> wrote:
> On Fri, Apr 7, 2017 at 10:05 AM, Joel Sherrill <joel at rtems.org> wrote:
> >
> >
> > On Fri, Apr 7, 2017 at 4:15 AM, Cillian O'Donnell <cpodonnell8 at gmail.com
> >
> > wrote:
> >>
> >> Great! That looks like a cleaner, more standardized solution. I was just
> >> hacking away until the warnings stopped. So can I go ahead and #include
> >> <inttypes.h> or should I wait until <rtems/inttypes.h> is defined before
> >> doing any more? Does this work for printk() too?
> >
> >
> > First the easy answer. printk() supports a subset of printf() formats. So
> > as long as it is a supported printf format, then yes. But I just looked
> for
> > printk() documentation and I don't see any. The code is in
> > cpukit/libcsupport/src/vprintk.c for a double check. It is supposed to
> > support everything required by any test.
> >
> > If a file only uses C99 standard PRI constants, then use <inttypes.h>
> >
> > If a file needs the extra ones being collected into <rtems/inttypes.h>,
> > then it should include that.
> >
> > No need to introduce an unneeded dependency.
> >
> > Funny, how this simple set of warnings has rippled. It also makes me
> > want to file a ticket for printk() documentation
#2985
> and adding code style
> > rules about <inttypes.h>.
> >
> Please do.
>
Done. https://devel.rtems.org/wiki/Developer/Coding/Conventions
>
> Also we should consider converting our code style into a doc instead
> of wiki page.
>
Beyond consider. I think it must happen. I think this is necessary artifact
for qualification reviews.
https://devel.rtems.org/ticket/2986
Please review my tickets and coding style change. :)
--joel
> > --joel
> >
> >
> >>
> >>
> >> Thanks Joel.
> >>
> >> _______________________________________________
> >> devel mailing list
> >> devel at rtems.org
> >> http://lists.rtems.org/mailman/listinfo/devel
> >
> >
> >
> > _______________________________________________
> > devel mailing list
> > devel at rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20170407/06fb6f6e/attachment-0002.html>
More information about the devel
mailing list