summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2006-09-01 15:37:47 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2006-09-01 15:37:47 +0000
commitb3ee778ea92b4a51ab415ee94999ae59cecda5cd (patch)
tree91c1ffd69758cd6338759ae1355c280ae66539ff /cpukit
parent2006-08-30 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-b3ee778ea92b4a51ab415ee94999ae59cecda5cd.tar.bz2
2006-09-01 Joel Sherrill <joel@OARcorp.com>
* libcsupport/src/malloc.c, libnetworking/rtems/rtems_glue.c, libnetworking/sys/mbuf.h: Remove warnings -- use uintptr_t or properly sized integers.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog6
-rw-r--r--cpukit/libcsupport/src/malloc.c18
-rw-r--r--cpukit/libnetworking/rtems/rtems_glue.c6
-rw-r--r--cpukit/libnetworking/sys/mbuf.h4
4 files changed, 20 insertions, 14 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 01519f2399..9cf31ce755 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-01 Joel Sherrill <joel@OARcorp.com>
+
+ * libcsupport/src/malloc.c, libnetworking/rtems/rtems_glue.c,
+ libnetworking/sys/mbuf.h: Remove warnings -- use uintptr_t or
+ properly sized integers.
+
2006-08-30 Joel Sherrill <joel@OARcorp.com>
* ftpd/ftpd.c, libcsupport/include/sys/ioccom.h,
diff --git a/cpukit/libcsupport/src/malloc.c b/cpukit/libcsupport/src/malloc.c
index 8f961cf8f3..9220eea1a3 100644
--- a/cpukit/libcsupport/src/malloc.c
+++ b/cpukit/libcsupport/src/malloc.c
@@ -111,8 +111,8 @@ void RTEMS_Malloc_Initialize(
{
rtems_status_code status;
void *starting_address;
- uint32_t old_address;
- uint32_t u32_address;
+ uintptr_t old_address;
+ uintptr_t uaddress;
/*
* Initialize the garbage collection list to start with nothing on it.
@@ -129,25 +129,25 @@ void RTEMS_Malloc_Initialize(
RTEMS_Malloc_Sbrk_amount = sbrk_amount;
if (!starting_address) {
- u32_address = (unsigned int)sbrk(length);
+ uaddress = (uintptr_t)sbrk(length);
- if (u32_address == (uint32_t ) -1) {
+ if (uaddress == (uintptr_t) -1) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
/* DOES NOT RETURN!!! */
}
- if (u32_address & (CPU_HEAP_ALIGNMENT-1)) {
- old_address = u32_address;
- u32_address = (u32_address + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1);
+ if (uaddress & (CPU_HEAP_ALIGNMENT-1)) {
+ old_address = uaddress;
+ uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1);
/*
* adjust the length by whatever we aligned by
*/
- length -= u32_address - old_address;
+ length -= uaddress - old_address;
}
- starting_address = (void *)u32_address;
+ starting_address = (void *)uaddress;
}
/*
diff --git a/cpukit/libnetworking/rtems/rtems_glue.c b/cpukit/libnetworking/rtems/rtems_glue.c
index 657a2f862e..4fb92f442b 100644
--- a/cpukit/libnetworking/rtems/rtems_glue.c
+++ b/cpukit/libnetworking/rtems/rtems_glue.c
@@ -48,8 +48,8 @@ void sysctl_register_all(void *arg);
/*
* Memory allocation
*/
-static int nmbuf = (64 * 1024) / MSIZE;
- int nmbclusters = (128 * 1024) / MCLBYTES;
+static uint32_t nmbuf = (64L * 1024L) / MSIZE;
+ uint32_t nmbclusters = (128L * 1024L) / MCLBYTES;
/*
* Network task synchronization
@@ -175,7 +175,7 @@ bsd_init (void)
*/
p = rtems_bsdnet_malloc_mbuf(nmbuf * MSIZE + MSIZE - 1,MBUF_MALLOC_MBUF);
- p = (char *)(((unsigned int)p + MSIZE - 1) & ~(MSIZE - 1));
+ p = (char *)(((uintptr_t)p + MSIZE - 1) & ~(MSIZE - 1));
if (p == NULL) {
printf ("Can't get network memory.\n");
return -1;
diff --git a/cpukit/libnetworking/sys/mbuf.h b/cpukit/libnetworking/sys/mbuf.h
index b710e88bd5..c5e34fce11 100644
--- a/cpukit/libnetworking/sys/mbuf.h
+++ b/cpukit/libnetworking/sys/mbuf.h
@@ -404,8 +404,8 @@ union mcluster {
extern struct mbuf *mbutl; /* virtual address of mclusters */
extern char *mclrefcnt; /* cluster reference counts */
extern struct mbstat mbstat;
-extern int nmbclusters;
-extern int nmbufs;
+extern uint32_t nmbclusters;
+extern uint32_t nmbufs;
extern struct mbuf *mmbfree;
extern union mcluster *mclfree;
extern int max_linkhdr; /* largest link-level header */