diff -Nru libscalar-list-utils-perl-1.59/Changes libscalar-list-utils-perl-1.61/Changes --- libscalar-list-utils-perl-1.59/Changes 2021-09-12 16:46:06.000000000 +0000 +++ libscalar-list-utils-perl-1.61/Changes 2022-02-16 12:40:34.000000000 +0000 @@ -1,3 +1,16 @@ +1.61 -- 2022-02-16 + [BUGFIXES} + * Fix some more signed comparison warnings (Perl5 #19429) + +1.60 -- 2021-10-08 + [BUGFIXES] + * Quiet some -Wsign-compare warnings by using `int` instead of `UV` + (RT136985) + * Quiet a -Wmaybe-uninitialized warning by ensuring a variable is + always initialised, because the compiler can't always determine this + is safe (RT139356) + * Avoid SIGFPE in product(-1, ...) (RT139601) + 1.59 -- 2021-09-12 [CHANGES] * Removed Scalar::Util::isbool() as the API design for older perls diff -Nru libscalar-list-utils-perl-1.59/debian/changelog libscalar-list-utils-perl-1.61/debian/changelog --- libscalar-list-utils-perl-1.59/debian/changelog 2021-09-21 17:42:40.000000000 +0000 +++ libscalar-list-utils-perl-1.61/debian/changelog 2022-02-20 15:29:06.000000000 +0000 @@ -1,3 +1,10 @@ +libscalar-list-utils-perl (1:1.61-1) unstable; urgency=medium + + * Team upload. + * Import upstream version 1.61. + + -- gregor herrmann Sun, 20 Feb 2022 16:29:06 +0100 + libscalar-list-utils-perl (1:1.59-1) unstable; urgency=medium * Team upload. diff -Nru libscalar-list-utils-perl-1.59/lib/List/Util/XS.pm libscalar-list-utils-perl-1.61/lib/List/Util/XS.pm --- libscalar-list-utils-perl-1.59/lib/List/Util/XS.pm 2021-09-12 16:46:06.000000000 +0000 +++ libscalar-list-utils-perl-1.61/lib/List/Util/XS.pm 2022-02-16 12:40:34.000000000 +0000 @@ -3,7 +3,7 @@ use warnings; use List::Util; -our $VERSION = "1.59"; # FIXUP +our $VERSION = "1.61"; # FIXUP $VERSION =~ tr/_//d; # FIXUP 1; diff -Nru libscalar-list-utils-perl-1.59/lib/List/Util.pm libscalar-list-utils-perl-1.61/lib/List/Util.pm --- libscalar-list-utils-perl-1.59/lib/List/Util.pm 2021-09-12 16:46:06.000000000 +0000 +++ libscalar-list-utils-perl-1.61/lib/List/Util.pm 2022-02-16 12:40:34.000000000 +0000 @@ -16,7 +16,7 @@ sample shuffle uniq uniqint uniqnum uniqstr zip zip_longest zip_shortest mesh mesh_longest mesh_shortest head tail pairs unpairs pairkeys pairvalues pairmap pairgrep pairfirst ); -our $VERSION = "1.59"; +our $VERSION = "1.61"; our $XS_VERSION = $VERSION; $VERSION =~ tr/_//d; diff -Nru libscalar-list-utils-perl-1.59/lib/Scalar/Util.pm libscalar-list-utils-perl-1.61/lib/Scalar/Util.pm --- libscalar-list-utils-perl-1.59/lib/Scalar/Util.pm 2021-09-12 16:46:06.000000000 +0000 +++ libscalar-list-utils-perl-1.61/lib/Scalar/Util.pm 2022-02-16 12:40:34.000000000 +0000 @@ -17,7 +17,7 @@ dualvar isdual isvstring looks_like_number openhandle readonly set_prototype tainted ); -our $VERSION = "1.59"; +our $VERSION = "1.61"; $VERSION =~ tr/_//d; require List::Util; # List::Util loads the XS diff -Nru libscalar-list-utils-perl-1.59/lib/Sub/Util.pm libscalar-list-utils-perl-1.61/lib/Sub/Util.pm --- libscalar-list-utils-perl-1.59/lib/Sub/Util.pm 2021-09-12 16:46:06.000000000 +0000 +++ libscalar-list-utils-perl-1.61/lib/Sub/Util.pm 2022-02-16 12:40:34.000000000 +0000 @@ -15,7 +15,7 @@ subname set_subname ); -our $VERSION = "1.59"; +our $VERSION = "1.61"; $VERSION =~ tr/_//d; require List::Util; # as it has the XS diff -Nru libscalar-list-utils-perl-1.59/ListUtil.xs libscalar-list-utils-perl-1.61/ListUtil.xs --- libscalar-list-utils-perl-1.59/ListUtil.xs 2021-09-12 16:45:31.000000000 +0000 +++ libscalar-list-utils-perl-1.61/ListUtil.xs 2022-02-16 12:40:34.000000000 +0000 @@ -406,7 +406,7 @@ IV i = SvIV(sv); if (retiv == 0) /* avoid later division by zero */ break; - if (retiv < 0) { + if (retiv < -1) { /* avoid -1 because that causes SIGFPE */ if (i < 0) { if (i >= IV_MAX / retiv) { retiv *= i; @@ -420,7 +420,7 @@ } } } - else { + else if (retiv > 0) { if (i < 0) { if (i >= IV_MIN / retiv) { retiv *= i; @@ -548,7 +548,7 @@ { SV *ret = sv_newmortal(); int index; - AV *retvals; + AV *retvals = NULL; GV *agv,*bgv; SV **args = &PL_stack_base[ax]; CV *cv = sv_to_cv(block, ix ? "reductions" : "reduce"); @@ -1584,10 +1584,10 @@ mesh_longest = ZIP_MESH_LONGEST mesh_shortest = ZIP_MESH_SHORTEST PPCODE: - UV nlists = items; /* number of lists */ - AV **lists; /* inbound lists */ - UV len = 0; /* length of longest inbound list = length of result */ - UV i; + Size_t nlists = items; /* number of lists */ + AV **lists; /* inbound lists */ + Size_t len = 0; /* length of longest inbound list = length of result */ + Size_t i; bool is_mesh = (ix & ZIP_MESH); ix &= ~ZIP_MESH; @@ -1628,12 +1628,12 @@ } if(is_mesh) { - UV retcount = len * nlists; + SSize_t retcount = (SSize_t)(len * nlists); EXTEND(SP, retcount); for(i = 0; i < len; i++) { - UV listi; + Size_t listi; for(listi = 0; listi < nlists; listi++) { SV *item = (i < av_count(lists[listi])) ? @@ -1647,10 +1647,10 @@ XSRETURN(retcount); } else { - EXTEND(SP, len); + EXTEND(SP, (SSize_t)len); for(i = 0; i < len; i++) { - UV listi; + Size_t listi; AV *ret = newAV(); av_extend(ret, nlists); diff -Nru libscalar-list-utils-perl-1.59/META.json libscalar-list-utils-perl-1.61/META.json --- libscalar-list-utils-perl-1.59/META.json 2021-09-12 16:48:46.000000000 +0000 +++ libscalar-list-utils-perl-1.61/META.json 2022-02-16 12:42:08.000000000 +0000 @@ -4,7 +4,7 @@ "Graham Barr " ], "dynamic_config" : 0, - "generated_by" : "ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010", + "generated_by" : "ExtUtils::MakeMaker version 7.62, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], @@ -53,6 +53,6 @@ "web" : "https://github.com/Scalar-List-Utils/Scalar-List-Utils" } }, - "version" : "1.59", - "x_serialization_backend" : "JSON::PP version 4.05" + "version" : "1.61", + "x_serialization_backend" : "JSON::PP version 4.06" } diff -Nru libscalar-list-utils-perl-1.59/META.yml libscalar-list-utils-perl-1.61/META.yml --- libscalar-list-utils-perl-1.59/META.yml 2021-09-12 16:48:46.000000000 +0000 +++ libscalar-list-utils-perl-1.61/META.yml 2022-02-16 12:42:08.000000000 +0000 @@ -8,7 +8,7 @@ configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 -generated_by: 'ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010' +generated_by: 'ExtUtils::MakeMaker version 7.62, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -23,5 +23,5 @@ resources: bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Scalar-List-Utils repository: https://github.com/Scalar-List-Utils/Scalar-List-Utils.git -version: '1.59' +version: '1.61' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -Nru libscalar-list-utils-perl-1.59/t/product.t libscalar-list-utils-perl-1.61/t/product.t --- libscalar-list-utils-perl-1.59/t/product.t 2021-09-12 16:38:17.000000000 +0000 +++ libscalar-list-utils-perl-1.61/t/product.t 2022-02-16 12:40:34.000000000 +0000 @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 25; +use Test::More tests => 27; use Config; use List::Util qw(product); @@ -32,6 +32,13 @@ $v = product(0, 0); is( $v, 0, 'two 0'); +# RT139601 cornercases +{ + # Numify the result because some older perl versions see "-0" as a string + is( 0+product(-1.0, 0), 0, 'product(-1.0, 0)' ); + is( 0+product(-1, 0), 0, 'product(-1, 0)' ); +} + my $x = -3; $v = product($x, 3);