| Store | Cart

an easy (?) way to knock off ~100 Coverity issues: smartify generated XS

From: Jarkko Hietaniemi <j...@iki.fi>
Wed, 23 Apr 2014 14:28:53 -0400
It seems that about 100 of the Coverity issues are because of this 
(Util.c of ext/Hash-Util):

323 XS_EUPXS(XS_Hash__Util_hash_seed)
324 {
325    dVAR; dXSARGS;
326    if (items != 0)
327       croak_xs_usage(cv,  "");
328    PERL_UNUSED_VAR(ax); /* -Wall */
329    SP -= items;
330    {
331 #line 68 "Util.xs"
332    mXPUSHs(newSVpvn((char *)PERL_HASH_SEED,PERL_HASH_SEED_BYTES));
333    XSRETURN(1);
334 #line 335 "Util.c"
    	
CID 29189 (#1 of 1): Structurally dead code (UNREACHABLE)
unreachable: This code cannot be reached: PL_stack_sp = sp;.

335        PUTBACK;
336        return;
337    }
338 }

That PUTBACK; return; is always generated, even when we generate an 
XSRETURN.

Recent Messages in this Thread
Jarkko Hietaniemi Apr 23, 2014 06:28 pm
Jarkko Hietaniemi Apr 27, 2014 06:33 pm
bulk88 Apr 28, 2014 06:03 am
Jarkko Hietaniemi Apr 29, 2014 12:06 pm
Messages in this thread