Mercurial > hg > xemacs-beta
comparison src/alloc.c @ 1634:750821e2c014
[xemacs-hg @ 2003-08-19 09:58:08 by michaels]
2003-08-19 René Kyllingstad <listmailxemacs@kyllingstad.com>
* alloc.c (kkcc_gc_stack_init):
(kkcc_gc_stack_realloc): Missing casts for the return value of
malloc and realloc.
author | michaels |
---|---|
date | Tue, 19 Aug 2003 09:58:10 +0000 |
parents | ac1be85b4a5f |
children | 763f577d57b0 |
comparison
equal
deleted
inserted
replaced
1633:baca156a450b | 1634:750821e2c014 |
---|---|
2967 | 2967 |
2968 static void | 2968 static void |
2969 kkcc_gc_stack_init (void) | 2969 kkcc_gc_stack_init (void) |
2970 { | 2970 { |
2971 kkcc_gc_stack_size = KKCC_INIT_GC_STACK_SIZE; | 2971 kkcc_gc_stack_size = KKCC_INIT_GC_STACK_SIZE; |
2972 kkcc_gc_stack_ptr = | 2972 kkcc_gc_stack_ptr = (kkcc_gc_stack_entry *) |
2973 malloc (kkcc_gc_stack_size * sizeof (kkcc_gc_stack_entry)); | 2973 malloc (kkcc_gc_stack_size * sizeof (kkcc_gc_stack_entry)); |
2974 if (!kkcc_gc_stack_ptr) | 2974 if (!kkcc_gc_stack_ptr) |
2975 { | 2975 { |
2976 stderr_out ("stack init failed for size %d\n", kkcc_gc_stack_size); | 2976 stderr_out ("stack init failed for size %d\n", kkcc_gc_stack_size); |
2977 exit(23); | 2977 exit(23); |
2991 | 2991 |
2992 static void | 2992 static void |
2993 kkcc_gc_stack_realloc (void) | 2993 kkcc_gc_stack_realloc (void) |
2994 { | 2994 { |
2995 kkcc_gc_stack_size *= 2; | 2995 kkcc_gc_stack_size *= 2; |
2996 kkcc_gc_stack_ptr = | 2996 kkcc_gc_stack_ptr = (kkcc_gc_stack_entry *) |
2997 realloc (kkcc_gc_stack_ptr, | 2997 realloc (kkcc_gc_stack_ptr, |
2998 kkcc_gc_stack_size * sizeof (kkcc_gc_stack_entry)); | 2998 kkcc_gc_stack_size * sizeof (kkcc_gc_stack_entry)); |
2999 if (!kkcc_gc_stack_ptr) | 2999 if (!kkcc_gc_stack_ptr) |
3000 { | 3000 { |
3001 stderr_out ("stack realloc failed for size %d\n", kkcc_gc_stack_size); | 3001 stderr_out ("stack realloc failed for size %d\n", kkcc_gc_stack_size); |