Changeset b3ee778e in rtems


Ignore:
Timestamp:
Sep 1, 2006, 3:37:47 PM (14 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
a612b50
Parents:
ddee935
Message:

2006-09-01 Joel Sherrill <joel@…>

  • libcsupport/src/malloc.c, libnetworking/rtems/rtems_glue.c, libnetworking/sys/mbuf.h: Remove warnings -- use uintptr_t or properly sized integers.
Location:
cpukit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    rddee935 rb3ee778e  
     12006-09-01      Joel Sherrill <joel@OARcorp.com>
     2
     3        * libcsupport/src/malloc.c, libnetworking/rtems/rtems_glue.c,
     4        libnetworking/sys/mbuf.h: Remove warnings -- use uintptr_t or
     5        properly sized integers.
     6
    172006-08-30      Joel Sherrill <joel@OARcorp.com>
    28
  • cpukit/libcsupport/src/malloc.c

    rddee935 rb3ee778e  
    112112  rtems_status_code   status;
    113113  void               *starting_address;
    114   uint32_t      old_address;
    115   uint32_t      u32_address;
     114  uintptr_t           old_address;
     115  uintptr_t           uaddress;
    116116
    117117  /*
     
    130130
    131131  if (!starting_address) {
    132     u32_address = (unsigned int)sbrk(length);
    133 
    134     if (u32_address == (uint32_t  ) -1) {
     132    uaddress = (uintptr_t)sbrk(length);
     133
     134    if (uaddress == (uintptr_t) -1) {
    135135      rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
    136136      /* DOES NOT RETURN!!! */
    137137    }
    138138
    139     if (u32_address & (CPU_HEAP_ALIGNMENT-1)) {
    140       old_address = u32_address;
    141       u32_address = (u32_address + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1);
     139    if (uaddress & (CPU_HEAP_ALIGNMENT-1)) {
     140      old_address = uaddress;
     141      uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1);
    142142
    143143       /*
     
    145145        */
    146146
    147       length -= u32_address - old_address;
    148     }
    149 
    150     starting_address = (void *)u32_address;
     147      length -= uaddress - old_address;
     148    }
     149
     150    starting_address = (void *)uaddress;
    151151  }
    152152
  • cpukit/libnetworking/rtems/rtems_glue.c

    rddee935 rb3ee778e  
    4949 * Memory allocation
    5050 */
    51 static int nmbuf        = (64 * 1024) / MSIZE;
    52        int nmbclusters  = (128 * 1024) / MCLBYTES;
     51static uint32_t nmbuf       = (64L * 1024L) / MSIZE;
     52       uint32_t nmbclusters = (128L * 1024L) / MCLBYTES;
    5353
    5454/*
     
    176176
    177177        p = rtems_bsdnet_malloc_mbuf(nmbuf * MSIZE + MSIZE - 1,MBUF_MALLOC_MBUF);
    178         p = (char *)(((unsigned int)p + MSIZE - 1) & ~(MSIZE - 1));
     178        p = (char *)(((uintptr_t)p + MSIZE - 1) & ~(MSIZE - 1));
    179179        if (p == NULL) {
    180180                printf ("Can't get network memory.\n");
  • cpukit/libnetworking/sys/mbuf.h

    rddee935 rb3ee778e  
    405405extern char     *mclrefcnt;             /* cluster reference counts */
    406406extern struct mbstat mbstat;
    407 extern int      nmbclusters;
    408 extern int      nmbufs;
     407extern uint32_t nmbclusters;
     408extern uint32_t nmbufs;
    409409extern struct mbuf *mmbfree;
    410410extern union mcluster *mclfree;
Note: See TracChangeset for help on using the changeset viewer.