On Wed, 9 Oct 2002, Nicholas Clark wrote:
> On Wed, Oct 09, 2002 at 02:14:50AM -0400, Tanton Gibbs wrote: > > In order, the other significant compiler warnings I see are: > > perlhash.pmc: In function `Parrot_PerlHash_get_pmc_keyed': > perlhash.pmc:192: warning: passing arg 2 of pointer to function from incompatible >pointer type > > 191 return entry->val.pmc_val->vtable->get_pmc_keyed(INTERP, > 192 entry, nextkey); > > No idea This one happens because entry is a HASH_ENTRY*, but get_pmc_keyed is expecting a PMC*. However, by this point in the function, we've already verified that entry is actually a PMC*, so it should be safe to add a cast, as in the patch below. This shuts the warning up, and all tests still pass. Simon --- classes/perlhash.pmc.old Wed Oct 9 15:59:29 2002 +++ classes/perlhash.pmc Wed Oct 9 15:59:41 2002 @@ -189,7 +189,7 @@ pmclass PerlHash { if (!nextkey) return entry->val.pmc_val; return entry->val.pmc_val->vtable->get_pmc_keyed(INTERP, - entry, nextkey); + (PMC*)entry, nextkey); } internal_exception(OUT_OF_BOUNDS,