Skip to content

Commit

Permalink
In Storable.xs, don't attempt return the return value of a void funct…
Browse files Browse the repository at this point in the history
…ion.

Sadly gcc is fine with the idea of return func_which_returns_void(); being
the same as return;. Vigilant C compilers are not.
  • Loading branch information
nwc10 committed Jun 13, 2013
1 parent 040e51c commit 0e6b41b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions dist/Storable/Storable.xs
Expand Up @@ -1169,7 +1169,7 @@ static void store_ref(pTHX_ store_cxt_t *store_cxt, SV *sv)
} else
WRITE_MARK(is_weak ? SX_WEAKREF : SX_REF);

return store(aTHX_ store_cxt, sv);
store(aTHX_ store_cxt, sv);
}

/*
Expand Down Expand Up @@ -1772,7 +1772,7 @@ static void store_code(pTHX_ store_cxt_t *store_cxt, CV *cv)
/*
* retrieve_code does not work with perl 5.005 or less
*/
return store_other(aTHX_ retrieve_cxt, (SV*)cv);
store_other(aTHX_ retrieve_cxt, (SV*)cv);
#else
dSP;
I32 len;
Expand All @@ -1786,7 +1786,8 @@ static void store_code(pTHX_ store_cxt_t *store_cxt, CV *cv)
(store_cxt->deparse < 0 && !(store_cxt->deparse =
SvTRUE(perl_get_sv("Storable::Deparse", GV_ADD)) ? 1 : 0))
) {
return store_other(aTHX_ store_cxt, (SV*)cv);
store_other(aTHX_ store_cxt, (SV*)cv);
return;
}

/*
Expand Down Expand Up @@ -2460,7 +2461,7 @@ static void store_blessed(
* Now emit the <object> part.
*/

return SV_STORE(type)(aTHX_ store_cxt, sv);
SV_STORE(type)(aTHX_ store_cxt, sv);
}

/*
Expand Down

0 comments on commit 0e6b41b

Please sign in to comment.