MD5.xs:375:21: error: mixing declarations and code is incompatible with 
standards before C99 [-Werror,-Wdeclaration-after-statement]
            unsigned char *buf = (unsigned char *)(SvPV(ST(2), len));

The build system asks for -Werror *and* -Wdeclaration-after-statement so
let's fix the code.  ok?


Index: gnu/usr.bin/perl/cpan/Digest-MD5/MD5.xs
===================================================================
RCS file: /home/cvs/src/gnu/usr.bin/perl/cpan/Digest-MD5/MD5.xs,v
retrieving revision 1.20
diff -u -p -r1.20 MD5.xs
--- gnu/usr.bin/perl/cpan/Digest-MD5/MD5.xs     1 Mar 2021 23:21:24 -0000       
1.20
+++ gnu/usr.bin/perl/cpan/Digest-MD5/MD5.xs     27 Dec 2022 01:20:54 -0000
@@ -371,8 +371,8 @@ context(ctx, ...)
     PPCODE:
        if (items > 2) {
            STRLEN len;
-           ctx->count = SvUV(ST(1)) << 3;
            unsigned char *buf = (unsigned char *)(SvPV(ST(2), len));
+           ctx->count = SvUV(ST(1)) << 3;
            ctx->state[0] = buf[ 0] | (buf[ 1]<<8) | (buf[ 2]<<16) | (buf[ 
3]<<24);
            ctx->state[1] = buf[ 4] | (buf[ 5]<<8) | (buf[ 6]<<16) | (buf[ 
7]<<24);
            ctx->state[2] = buf[ 8] | (buf[ 9]<<8) | (buf[10]<<16) | 
(buf[11]<<24);


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to