[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH gnulib] * lib/malloca.c: Use uintptr_t to convert pointers to int
From: |
Marc-André Lureau |
Subject: |
[PATCH gnulib] * lib/malloca.c: Use uintptr_t to convert pointers to integers. Fix warnings with MinGW64 x64. |
Date: |
Tue, 24 Jan 2012 01:57:28 +0100 |
---
ChangeLog | 5 +++++
lib/malloca.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5eff018..81d9557 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-01-24 Marc-André Lureau <address@hidden>
+
+ * lib/malloca.c: Use uintptr_t to convert pointers to
+ integers. Fix warnings with MinGW64 x64.
+
2012-01-23 Paul Eggert <address@hidden>
doc: omit trailing empty lines from INSTALL etc.
diff --git a/lib/malloca.c b/lib/malloca.c
index c81ffbc..8b214e4 100644
--- a/lib/malloca.c
+++ b/lib/malloca.c
@@ -85,7 +85,7 @@ mmalloca (size_t n)
((int *) p)[-1] = MAGIC_NUMBER;
/* Enter p into the hash table. */
- slot = (unsigned long) p % HASH_TABLE_SIZE;
+ slot = (uintptr_t) p % HASH_TABLE_SIZE;
((struct header *) (p - HEADER_SIZE))->next = mmalloca_results[slot];
mmalloca_results[slot] = p;
@@ -118,7 +118,7 @@ freea (void *p)
{
/* Looks like a mmalloca() result. To see whether it really is one,
perform a lookup in the hash table. */
- size_t slot = (unsigned long) p % HASH_TABLE_SIZE;
+ size_t slot = (uintptr_t) p % HASH_TABLE_SIZE;
void **chain = &mmalloca_results[slot];
for (; *chain != NULL;)
{
--
1.7.7.5
- [PATCH gnulib] * lib/malloca.c: Use uintptr_t to convert pointers to integers. Fix warnings with MinGW64 x64.,
Marc-André Lureau <=