summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2009-11-23 17:06:03 -0800
committerKaz Kylheku <kaz@kylheku.com>2009-11-23 17:06:03 -0800
commit6fdcac1bc2cd78acdc62d0e3a2905bf8ec22b0c8 (patch)
tree00e099a3a20403a1b9c63728f8665a75447f3d9a
parent0a017cee2b2a0d798d79ab09b89826def053f6e6 (diff)
downloadtxr-6fdcac1bc2cd78acdc62d0e3a2905bf8ec22b0c8.tar.gz
txr-6fdcac1bc2cd78acdc62d0e3a2905bf8ec22b0c8.tar.bz2
txr-6fdcac1bc2cd78acdc62d0e3a2905bf8ec22b0c8.zip
* lib.c (chk_malloc, chk_realloc): Fix diagnosable conversion,
caught by gcc 4.1.1.
-rw-r--r--ChangeLog5
-rw-r--r--lib.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0cee0f2a..e206875a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2009-11-23 Kaz Kylheku <kkylheku@gmail.com>
+ * lib.c (chk_malloc, chk_realloc): Fix diagnosable conversion,
+ caught by gcc 4.1.1.
+
+2009-11-23 Kaz Kylheku <kkylheku@gmail.com>
+
* configure (cross): Print out value of $cross in --help.
* depend.txr: Add "config.h" to list of headers that are not
diff --git a/lib.c b/lib.c
index 55913d70..eb612f42 100644
--- a/lib.c
+++ b/lib.c
@@ -529,7 +529,7 @@ static val equal_tramp(val env, val left, val right)
unsigned char *chk_malloc(size_t size)
{
- char *ptr = malloc(size);
+ unsigned char *ptr = malloc(size);
if (size && ptr == 0)
ptr = oom_realloc(0, size);
return ptr;
@@ -537,7 +537,7 @@ unsigned char *chk_malloc(size_t size)
unsigned char *chk_realloc(void *old, size_t size)
{
- char *newptr = realloc(old, size);
+ unsigned char *newptr = realloc(old, size);
if (size != 0 && newptr == 0)
newptr = oom_realloc(old, size);
return newptr;