From: Paul Marquess Date: Wed, 25 Mar 2009 12:41:40 +0000 (+0000) Subject: fix smoke issues with the compression modules X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=776304fb7495ca9887f88c5e9a08bc830a2f4b4d;p=p5sagit%2Fp5-mst-13.2.git fix smoke issues with the compression modules [tweaked to add break; after each default; to make gcc happy] --- diff --git a/ext/Compress-Raw-Bzip2/Bzip2.xs b/ext/Compress-Raw-Bzip2/Bzip2.xs index 1e6eeb9..6dec48d 100644 --- a/ext/Compress-Raw-Bzip2/Bzip2.xs +++ b/ext/Compress-Raw-Bzip2/Bzip2.xs @@ -267,6 +267,8 @@ char * string; case SVt_PVHV: case SVt_PVCV: croak("%s: buffer parameter is not a SCALAR reference", string); + default: + break; } if (SvROK(sv)) croak("%s: buffer parameter is a reference to a reference", string) ; @@ -304,6 +306,8 @@ char * string ; case SVt_PVHV: case SVt_PVCV: croak("%s: buffer parameter is not a SCALAR reference", string); + default: + break; } if (SvROK(sv)) croak("%s: buffer parameter is a reference to a reference", string) ; diff --git a/ext/Compress-Raw-Zlib/Zlib.xs b/ext/Compress-Raw-Zlib/Zlib.xs index 944e342..251f998 100644 --- a/ext/Compress-Raw-Zlib/Zlib.xs +++ b/ext/Compress-Raw-Zlib/Zlib.xs @@ -541,6 +541,8 @@ char * string; case SVt_PVHV: case SVt_PVCV: croak("%s: buffer parameter is not a SCALAR reference", string); + default: + break; } if (SvROK(sv)) croak("%s: buffer parameter is a reference to a reference", string) ; @@ -578,6 +580,8 @@ char * string ; case SVt_PVHV: case SVt_PVCV: croak("%s: buffer parameter is not a SCALAR reference", string); + default: + break; } if (SvROK(sv)) croak("%s: buffer parameter is a reference to a reference", string) ; diff --git a/t/lib/compress/generic.pl b/t/lib/compress/generic.pl index 4e2f113..54abab0 100644 --- a/t/lib/compress/generic.pl +++ b/t/lib/compress/generic.pl @@ -87,8 +87,8 @@ sub run ok ! -e $name, " $name does not exist"; - eval qq[\$a = new $UncompressClass "$name" ;] ; - is lc($!), "no such file or directory", '$! = "no such file or directory"'; + $a = new $UncompressClass "$name" ; + is $a, undef; my $gc ; my $guz = new $CompressClass(\$gc); diff --git a/t/lib/compress/merge.pl b/t/lib/compress/merge.pl index 477c3d3..6134292 100644 --- a/t/lib/compress/merge.pl +++ b/t/lib/compress/merge.pl @@ -89,15 +89,7 @@ sub run ok ! $gz, " Did not create $CompressClass object"; - { - if ($to_file) { - like lc($$Error), '/permission denied/', - " Got non-writable filename message" ; - } - else { - ok $$Error, " Got error message" ; - } - } + ok $$Error, " Got error message" ; } chmod 0777, $out_file ;