Adding null initializations

This commit is contained in:
Jay McCarthy 2010-05-18 08:45:37 -05:00
parent 749096f87c
commit 010e3d5381
5 changed files with 8 additions and 8 deletions

View File

@ -557,7 +557,7 @@ void GC_set_fl_marks(ptr_t q)
{ {
ptr_t p; ptr_t p;
struct hblk * h, * last_h = 0; struct hblk * h, * last_h = 0;
hdr *hhdr; /* gcc "might be uninitialized" warning is bogus. */ hdr *hhdr = NULL;
IF_PER_OBJ(size_t sz;) IF_PER_OBJ(size_t sz;)
unsigned bit_no; unsigned bit_no;
@ -598,8 +598,8 @@ void GC_clear_fl_marks(ptr_t q)
{ {
ptr_t p; ptr_t p;
struct hblk * h, * last_h = 0; struct hblk * h, * last_h = 0;
hdr *hhdr; hdr *hhdr = NULL;
size_t sz; size_t sz = 0;
unsigned bit_no; unsigned bit_no;
for (p = q; p != 0; p = obj_link(p)){ for (p = q; p != 0; p = obj_link(p)){

View File

@ -32,7 +32,7 @@ typedef struct StackFrame {
unsigned long FindTopOfStack(unsigned long stack_start) unsigned long FindTopOfStack(unsigned long stack_start)
{ {
StackFrame *frame; StackFrame *frame = NULL;
if (stack_start == 0) { if (stack_start == 0) {
# ifdef POWERPC # ifdef POWERPC

View File

@ -759,7 +759,7 @@ void * GC_debug_realloc(void * p, size_t lb, GC_EXTRA_PARAMS)
{ {
void * base = GC_base(p); void * base = GC_base(p);
ptr_t clobbered; ptr_t clobbered;
void * result; void * result = NULL;
size_t copy_sz = lb; size_t copy_sz = lb;
size_t old_sz; size_t old_sz;
hdr * hhdr; hdr * hhdr;

View File

@ -897,7 +897,7 @@ int GC_invoke_finalizers()
static int doing = 0; /* PLTSCHEME */ static int doing = 0; /* PLTSCHEME */
struct finalizable_object * curr_fo; struct finalizable_object * curr_fo;
int count = 0; int count = 0;
word bytes_freed_before; word bytes_freed_before = 0;
DCL_LOCK_STATE; DCL_LOCK_STATE;
/* PLTSCHEME: don't allow nested finalizations */ /* PLTSCHEME: don't allow nested finalizations */

View File

@ -620,8 +620,8 @@ mse * GC_mark_from(mse *mark_stack_top, mse *mark_stack, mse *mark_stack_limit)
signed_word credit = HBLKSIZE; /* Remaining credit for marking work */ signed_word credit = HBLKSIZE; /* Remaining credit for marking work */
ptr_t current_p; /* Pointer to current candidate ptr. */ ptr_t current_p; /* Pointer to current candidate ptr. */
word current; /* Candidate pointer. */ word current; /* Candidate pointer. */
ptr_t limit; /* (Incl) limit of current candidate */ ptr_t limit = NULL; /* (Incl) limit of current candidate */
/* range */ /* range */
word descr; word descr;
ptr_t greatest_ha = GC_greatest_plausible_heap_addr; ptr_t greatest_ha = GC_greatest_plausible_heap_addr;
ptr_t least_ha = GC_least_plausible_heap_addr; ptr_t least_ha = GC_least_plausible_heap_addr;