Subject: | Warning caused by $count variable init typo in get8bimheaders |
Date: | Sun, 19 Oct 2008 11:36:51 +0200 |
To: | bug-JPEG-JFIF [...] rt.cpan.org |
From: | Adrian Aichner <adrian [...] elisp.de> |
Hi!
Using JPEG::JFIF
I get following warning:
Useless use of numeric eq (==) in void context at c:/strawberry/perl/site/lib/JPEG/JFIF.pm line 119.
Looking at get8bimheaders sources, (e.g. in
http://search.cpan.org/src/KRZAK/JFIF-0.11/JFIF.pm) it appears obvious
that following change would be in order:
diff -u c:\strawberry\perl\site\lib\JPEG\JFIF.pm.~1~ c:\strawberry\perl\site\lib\JPEG\JFIF.pm
--- c:\strawberry\perl\site\lib\JPEG\JFIF.pm.~1~ 2008-10-19 11:33:51.906391500 +0200
+++ c:\strawberry\perl\site\lib\JPEG\JFIF.pm 2008-10-19 11:33:51.906391500 +0200
@@ -116,7 +116,7 @@
sub get8bimheaders {
my ($cl,$header) = @_;
if (!exists($cl->{header})) { $header = $cl->getheader(); }
- my $count == 0;
+ my $count = 0;
for (my $i=0; $i<$cl->{headsize}; $i++) {
if (unpack("N",substr($header,$i,4)) == 0x3842494D) {
$i += 4;
Best regards!
Adrian
--
Adrian Aichner
mailto:adrian@elisp.de