[svn:parrot] r41781 - branches/pcc_reapply/src/call

chromatic at svn.parrot.org chromatic at svn.parrot.org
Sat Oct 10 00:25:53 UTC 2009


Author: chromatic
Date: Sat Oct 10 00:25:53 2009
New Revision: 41781
URL: https://trac.parrot.org/parrot/changeset/41781

Log:
[pcc] Fixed compiler warnings in fill_results() -- especially switching *over*
the setting of a variable used to determine from where to pull results.

Modified:
   branches/pcc_reapply/src/call/args.c

Modified: branches/pcc_reapply/src/call/args.c
==============================================================================
--- branches/pcc_reapply/src/call/args.c	Sat Oct 10 00:16:56 2009	(r41780)
+++ branches/pcc_reapply/src/call/args.c	Sat Oct 10 00:25:53 2009	(r41781)
@@ -1511,6 +1511,7 @@
 
         /* We have a positional return, fill the result with it. */
         if (return_index < positional_returns) {
+            INTVAL constant = PARROT_ARG_CONSTANT_ISSET(return_flags);
 
             /* Fill a named result with a positional return. */
             if (result_flags & PARROT_ARG_NAME) {
@@ -1541,7 +1542,6 @@
 
             /* Go ahead and fill the result with a positional return. */
             switch (PARROT_ARG_TYPE_MASK_MASK(return_flags)) {
-                INTVAL constant = PARROT_ARG_CONSTANT_ISSET(return_flags);
                 case PARROT_ARG_INTVAL:
                     if (constant)
                         VTABLE_set_integer_native(interp, result_item,
@@ -2024,9 +2024,10 @@
     if (PMC_IS_NULL(call_object)) {
         if (raw_return_count > 0)
             if (err_check)
-                Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
-                        "too many return values: %d passed, 0 expected",
-                        raw_return_count);
+                Parrot_ex_throw_from_c_args(interp, NULL,
+                    EXCEPTION_INVALID_OPERATION,
+                    "too many return values: %d passed, 0 expected",
+                    raw_return_count);
         return;
     }
 
@@ -2036,7 +2037,7 @@
             if (err_check)
                 Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
                         "too many return values: %d passed, 0 expected",
-                        raw_return_count, return_list_elements);
+                        raw_return_count);
         return;
     }
     else


More information about the parrot-commits mailing list