[svn:parrot] r41908 - branches/pcc_reapply/src
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Sat Oct 17 20:46:58 UTC 2009
Author: chromatic
Date: Sat Oct 17 20:46:57 2009
New Revision: 41908
URL: https://trac.parrot.org/parrot/changeset/41908
Log:
[src] Explicitly initialized potential PCC return values before PCC calls.
Modified:
branches/pcc_reapply/src/thread.c
branches/pcc_reapply/src/utils.c
Modified: branches/pcc_reapply/src/thread.c
==============================================================================
--- branches/pcc_reapply/src/thread.c Sat Oct 17 20:46:54 2009 (r41907)
+++ branches/pcc_reapply/src/thread.c Sat Oct 17 20:46:57 2009 (r41908)
@@ -501,7 +501,7 @@
PMC * volatile sub_pmc;
PMC *sub_arg;
PMC * const self = (PMC*) arg;
- PMC *ret_val = NULL;
+ PMC *ret_val = PMCNULL;
Parrot_Interp interp =
(Parrot_Interp)((Parrot_ParrotInterpreter_attributes *)PMC_data(self))->interp;
@@ -524,8 +524,6 @@
VTABLE_get_string(interp, exception),
VTABLE_get_integer_keyed_str(interp, exception,
Parrot_str_new_constant(interp, "type"))); */
-
- ret_val = PMCNULL;
}
else {
/* run normally */
Modified: branches/pcc_reapply/src/utils.c
==============================================================================
--- branches/pcc_reapply/src/utils.c Sat Oct 17 20:46:54 2009 (r41907)
+++ branches/pcc_reapply/src/utils.c Sat Oct 17 20:46:57 2009 (r41908)
@@ -906,7 +906,7 @@
COMPARE(PARROT_INTERP, ARGIN(void *a), ARGIN(void *b), ARGIN(PMC *cmp))
{
ASSERT_ARGS(COMPARE)
- INTVAL result;
+ INTVAL result = 0;
if (PMC_IS_NULL(cmp))
return VTABLE_cmp(interp, (PMC *)a, (PMC *)b);
More information about the parrot-commits
mailing list