[RTEMS Project] #2128: [Patch] io.h: Use uint32_t and co. instead of "unsigned int"

RTEMS trac trac at rtems.org
Mon Dec 1 06:21:12 UTC 2014


#2128: [Patch] io.h: Use uint32_t and co. instead of "unsigned int"
--------------------------+----------------------------
 Reporter:  nick.withers  |       Owner:  joel.sherrill
     Type:  defect        |      Status:  new
 Priority:  normal        |   Milestone:  4.11
Component:  cpukit        |     Version:  4.11
 Severity:  trivial       |  Resolution:
 Keywords:                |
--------------------------+----------------------------

Comment (by nick.withers):

 New patch attached, tested with:
   - MVME3100 BSP and my code, which "seems to work" - it doesn't itself
 use ''in_8()'' or ''out_8()'', though. For what it's worth, I've actually
 had my ''io.h'' (and just it) patched with the fixed-width types since the
 ticket was opened
   - ''gmake all'' (configured with ''--enable-rtemsbsp="mvme3100 mvme5500
 beatnik" --enable-tests=yes''), redirecting stdout and stderr and
 comparing before and after - there are no new warnings

 Couple of notes:
   - I'm not ''totally'' sure that passing in a variable of less width than
 a CPU register to an asm statement is kosher, e.g.:
 {{{
 -       int ret;
 +       uint8_t ret;

         __asm__ __volatile__("lbz%U1%X1 %0,%1; eieio" : "=r" (ret) : "m"
 (*addr));
         return ret;
 }}}
   - I only added the stdint.h header (or inttypes.h if the PRIx macros
 were used) to files which didn't already use the C99 fixed-width types.
 Those that were already missing it still are

--
Ticket URL: <http://devel.rtems.org/ticket/2128#comment:10>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list