[svn:parrot] r40135 - trunk/src/pmc
fperrad at svn.parrot.org
fperrad at svn.parrot.org
Fri Jul 17 14:22:06 UTC 2009
Author: fperrad
Date: Fri Jul 17 14:22:05 2009
New Revision: 40135
URL: https://trac.parrot.org/parrot/changeset/40135
Log:
[cage] fix warning
warning: 'box' might be used uninitialized in this function
Modified:
trunk/src/pmc/hash.pmc
Modified: trunk/src/pmc/hash.pmc
==============================================================================
--- trunk/src/pmc/hash.pmc Fri Jul 17 13:55:17 2009 (r40134)
+++ trunk/src/pmc/hash.pmc Fri Jul 17 14:22:05 2009 (r40135)
@@ -1025,7 +1025,7 @@
Hash * const hash = (Hash *)SELF.get_pointer();
void * const keystr = hash_key_from_pmc(INTERP, hash, key);
PMC * const nextkey = key_next(INTERP, key);
- PMC *box;
+ PMC *box = PMCNULL;
HashBucket *b;
@@ -1041,7 +1041,7 @@
box = hash_value_to_pmc(INTERP, hash, b->value);
/* autovivify an Hash */
- if (!box)
+ if (PMCNULL == box)
box = pmc_new(INTERP, SELF.type());
VTABLE_set_number_keyed(INTERP, box, nextkey, value);
More information about the parrot-commits
mailing list