<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 8/21/2013 7:59 AM, Gedare Bloom
wrote:<br>
</div>
<blockquote
cite="mid:CAC82fA1571q=zbupDoSGf6OYBmkAvkMvA9tU6EXaN5Q8=xZKLQ@mail.gmail.com"
type="cite">
<pre wrap="">Hi,
The documentation you pointed to is the Linux kernel doc, which are
not entirely relevant for RTEMS. Is there a POSIX standard that
governs this issue?
</pre>
</blockquote>
Well... the basic types are covered by inttypes.h which is POSIX and
<br>
the link I posted covers. That file is in newlib.<br>
<br>
<a
href="http://pubs.opengroup.org/onlinepubs/009604599/basedefs/inttypes.h.html">http://pubs.opengroup.org/onlinepubs/009604599/basedefs/inttypes.h.html</a><br>
<br>
inttypes.h itself is (more than likely) correct. <br>
<br>
As an aside, inttypes.h prototypes four methods. newlib does not<br>
have implementations of them. I started a discussion on adding them<br>
and this is the thread:<br>
<br>
<a href="http://sourceware.org/ml/newlib/2013/msg00626.html">http://sourceware.org/ml/newlib/2013/msg00626.html</a><br>
<br>
Corinna <span style="color: rgb(0, 0, 0); font-family: 'Times New
Roman'; font-size: medium; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: left; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline
!important; float: none;">Vinschen<span
class="Apple-converted-space"> proposed a rather elegant
solution which would provide<br>
them as aliases for existing routines. Then the documentation
for each<br>
would have to be added. <br>
<br>
If you are working in this area, this is a good thing to touch
on.<br>
</span></span>
<blockquote
cite="mid:CAC82fA1571q=zbupDoSGf6OYBmkAvkMvA9tU6EXaN5Q8=xZKLQ@mail.gmail.com"
type="cite">
<pre wrap="">
This looks like mostly converting pointer types to long unsigned int?
Some of the changes seem like they should not be necessary, like:
- printf( "...st_blksize %" PRIxblksize_t "\n", statbuf.st_blksize );
- printf( "...st_blocks %" PRIxblkcnt_t "\n", statbuf.st_blocks );
+ printf( "...st_blksize %" PRIxblksize_t "\n", (long unsigned
int)statbuf.st_blksize );
+ printf( "...st_blocks %" PRIxblkcnt_t "\n", (long unsigned
int)statbuf.st_blocks );
</pre>
</blockquote>
These are NOT covered by the POSIX inttypes.h. I see one of them <br>
defined in ./testsuites/psxtests/include/pmacros.h. So they are<br>
test support and logically extend the type specific print specifiers
<br>
in inttypes.h. Apparently some of them are wrong.<br>
<br>
If you eliminate the warning on sparc or powerpc, then that will<br>
likely cover most targets. But if the underlying type varies based<br>
on target architecture, then you will have to check it on the<br>
varying architectures.<br>
<br>
Should be a series of one-line fixes which don't reflect the mental<br>
power required to solve. :)<br>
<blockquote
cite="mid:CAC82fA1571q=zbupDoSGf6OYBmkAvkMvA9tU6EXaN5Q8=xZKLQ@mail.gmail.com"
type="cite">
<pre wrap="">
Here the printf already should accommodate the size of the type of the
blksize_t and blkcnt_t. This is how I usually see this issue of
variably-sized types being printed. I don't know the right answer.
-Gedare
On Wed, Aug 21, 2013 at 12:33 AM, Rempel, Cynthia
<a class="moz-txt-link-rfc2396E" href="mailto:cynt6007@vandals.uidaho.edu"><cynt6007@vandals.uidaho.edu></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
Reducing the number of unnecessary compiler warnings makes it easier to find (and fix) real compiler warnings...
The fix is in accordance with:
<a class="moz-txt-link-freetext" href="https://www.kernel.org/doc/Documentation/printk-formats.txt">https://www.kernel.org/doc/Documentation/printk-formats.txt</a>
If <type> is dependent on a config option for its size (e.g., sector_t,
blkcnt_t) or is architecture-dependent for its size (e.g., tcflag_t), use a
format specifier of its largest possible type and explicitly cast to it.
This patch reduces the number of posix tests compiler warnings, by recasting arguments in printf statements...
Thanks,
Cynthia Rempel
_______________________________________________
rtems-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rtems-devel@rtems.org">rtems-devel@rtems.org</a>
<a class="moz-txt-link-freetext" href="http://www.rtems.org/mailman/listinfo/rtems-devel">http://www.rtems.org/mailman/listinfo/rtems-devel</a>
</pre>
</blockquote>
<pre wrap="">_______________________________________________
rtems-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rtems-devel@rtems.org">rtems-devel@rtems.org</a>
<a class="moz-txt-link-freetext" href="http://www.rtems.org/mailman/listinfo/rtems-devel">http://www.rtems.org/mailman/listinfo/rtems-devel</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Joel Sherrill, Ph.D. Director of Research & Development
<a class="moz-txt-link-abbreviated" href="mailto:joel.sherrill@OARcorp.com">joel.sherrill@OARcorp.com</a> On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985 </pre>
</body>
</html>