summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;