register XPVHV* xhv;
register HE *entry;
I32 riter = -1;
- I32 items;
+ I32 items = 0;
const bool stash_had_name = stash && HvENAME(stash);
bool fetched_isarev = FALSE;
HV *seen = NULL;
* mro_isa_changed_in called on it. That happens if it was
* detached from the symbol table (so it had no HvENAME) before
* being assigned to the spot named by the ‘name’ variable, because
- * its cached isa linerisation is now stale (the effective name
+ * its cached isa linearisation is now stale (the effective name
* having changed), and subclasses will then use that cache when
* mro_package_moved calls mro_isa_changed_in. (See
* [perl #77358].)
if(!fetched_isarev) {
/* If oldstash is not null, then we can use its HvENAME to look up
the isarev hash, since all its subclasses will be listed there.
+ It will always have an HvENAME. It the HvENAME was removed
+ above, then fetch_isarev will be true, and this code will not be
+ reached.
- If oldstash is null or is no longer in the symbol table, then
- this is an empty spot with no stash in it, so subclasses could
- be listed in isarev hashes belonging to any of the names, so we
- have to check all of them. */
- char *hvename = oldstash ? HvENAME(oldstash) : NULL;
- if (hvename) {
+ If oldstash is null, then this is an empty spot with no stash in
+ it, so subclasses could be listed in isarev hashes belonging to
+ any of the names, so we have to check all of them.
+ */
+ assert(!oldstash || HvENAME(oldstash));
+ if (oldstash) {
+ /* Extra variable to avoid a compiler warning */
+ char * const hvename = HvENAME(oldstash);
fetched_isarev = TRUE;
svp = hv_fetch(PL_isarev, hvename, HvENAMELEN_get(oldstash), 0);
if (svp) isarev = MUTABLE_HV(*svp);