Skip Menu |

This queue is for tickets about the JPEG-JFIF CPAN distribution.

Report information
The Basics
Id: 40161
Status: resolved
Priority: 0/
Queue: JPEG-JFIF

People
Owner: Nobody in particular
Requestors: adrian [...] elisp.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
Subject: Re: [rt.cpan.org #40161] Warning caused by $count variable init typo in get8bimheaders
Date: Sun, 19 Oct 2008 12:49:11 +0200
To: "bug-JPEG-JFIF [...] rt.cpan.org" <bug-JPEG-JFIF [...] rt.cpan.org>
From: marcin.krzyzanowski [...] gmail.com
You right. I'll apply it asap. Thanks. Marcin Krzyżanowski W dniu 2008-10-19, o godz. 11:37, "adrian@elisp.de via RT" <bug-JPEG-JFIF@rt.cpan.org Show quoted text
> napisał(a):
Show quoted text
> Sun Oct 19 05:37:09 2008: Request 40161 was acted upon. > Transaction: Ticket created by adrian@elisp.de > Queue: JPEG-JFIF > Subject: Warning caused by $count variable init typo in > get8bimheaders > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: adrian@elisp.de > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=40161 > > > > > 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 >
fixed in version 0.12