Bug 6488 - [review] Lint errors with Perl 5.12.1 in AntiVirus.pm
[review] Lint errors with Perl 5.12.1 in AntiVirus.pm
Status: RESOLVED FIXED
Product: Spamassassin
Classification: Unclassified
Component: Libraries
3.3.1
All Linux
: P3 normal
: 3.3.2
Assigned To: SpamAssassin Developer Mailing List
ready to commit
:
: 6502 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2010-09-08 15:39 UTC by Larry Rosenbaum
Modified: 2013-05-31 01:29 UTC (History)
3 users (show)



Attachment Type Modified Status Actions Submitter/CLA Status
the diff (for reference) patch None Mark Martinec [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Larry Rosenbaum 2010-09-08 15:39:05 UTC
When running SA v3.3.1 on Linux with perl 5.12.1, I get the following lint errors:

Sep  8 15:23:44.322 [21388] warn: Use of "goto" to jump into a construct is deprecated at /opt/ActivePerl-5.12/site/lib/Mail/SpamAssassin/Plugin/Check.pm line 409.
Sep  8 15:23:45.242 [21388] warn: Use of uninitialized value in lc at /opt/ActivePerl-5.12/site/lib/Mail/SpamAssassin/Plugin/MIMEEval.pm line 501.
Sep  8 15:23:45.248 [21388] warn: Use of uninitialized value $name in lc at /opt/ActivePerl-5.12/site/lib/Mail/SpamAssassin/Plugin/AntiVirus.pm line 101.
Sep  8 15:23:45.248 [21388] warn: Use of uninitialized value in lc at /opt/ActivePerl-5.12/site/lib/Mail/SpamAssassin/Plugin/AntiVirus.pm line 103.

The 'Use of "goto" line appears several times.  Also, there is a warning about defined(%hash), but that has already been reported.

SpamAssassin version 3.3.1
  running on Perl version 5.12.1
Linux ornlspam01.ornl.gov 2.6.18-194.11.1.el5 #1 SMP Tue Jul 27 05:45:06 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
Comment 1 Karsten Bräckelmann 2010-09-08 17:05:17 UTC
> Sep  8 15:23:44.322 [21388] warn: Use of "goto" to jump into a construct is
> deprecated at /opt/ActivePerl-5.12/site/lib/Mail/SpamAssassin/Plugin/Check.pm
> line 409.

Bug 6392, fixed in trunk and 3.3 branch.

> Sep  8 15:23:45.242 [21388] warn: Use of uninitialized value in lc at
> /opt/ActivePerl-5.12/site/lib/Mail/SpamAssassin/Plugin/MIMEEval.pm line 501.

Bug 6396, fixed in trunk and 3.3 branch.

> Sep  8 15:23:45.248 [21388] warn: Use of uninitialized value $name in lc at
> /opt/ActivePerl-5.12/site/lib/Mail/SpamAssassin/Plugin/AntiVirus.pm line 101.
> Sep  8 15:23:45.248 [21388] warn: Use of uninitialized value in lc at
> /opt/ActivePerl-5.12/site/lib/Mail/SpamAssassin/Plugin/AntiVirus.pm line 103.

This appears to be un-reported so far.

> The 'Use of "goto" line appears several times.  Also, there is a warning about
> defined(%hash), but that has already been reported.

Indeed, bug 6392 again.
Comment 2 Joan 2010-10-20 20:32:07 UTC
I have the same exact error with the SVN of today (Oct 20, 2010):

Oct 21 03:31:05 master spamd[8214]: Use of uninitialized value $name in lc at /usr/lib/perl5/site_perl/5.12.2/Mail/SpamAssassin/Plugin/AntiVirus.pm line 101.
Oct 21 03:31:05 master spamd[8214]: Use of uninitialized value in lc at /usr/lib/perl5/site_perl/5.12.2/Mail/SpamAssassin/Plugin/AntiVirus.pm line 103.
Oct 21 03:31:05 master spamd[8214]: Use of uninitialized value $name in lc at /usr/lib/perl5/site_perl/5.12.2/Mail/SpamAssassin/Plugin/AntiVirus.pm line 101.
Oct 21 03:31:05 master spamd[8214]: Use of uninitialized value in lc at /usr/lib/perl5/site_perl/5.12.2/Mail/SpamAssassin/Plugin/AntiVirus.pm line 103.
Oct 21 03:31:05 master spamd[8214]: Use of uninitialized value $name in lc at /usr/lib/perl5/site_perl/5.12.2/Mail/SpamAssassin/Plugin/AntiVirus.pm line 101.
Oct 21 03:31:05 master spamd[8214]: Use of uninitialized value in lc at /usr/lib/perl5/site_perl/5.12.2/Mail/SpamAssassin/Plugin/AntiVirus.pm line 103.
Comment 3 Joan 2010-10-20 20:33:25 UTC
Note : Using perl 5.12.2 on LInux 2.6.34.6  - 64bits (AMD)
Comment 4 Karsten Bräckelmann 2010-10-27 20:05:21 UTC
*** Bug 6502 has been marked as a duplicate of this bug. ***
Comment 5 Joan 2010-10-27 20:11:06 UTC
What to do to fix this ?
Comment 6 Karsten Bräckelmann 2010-10-27 20:22:39 UTC
Oh, come on. This is a bug tracker, not a forum. If you need help or assistance, please tend to the users mailing list.

The fix to this bug should be pretty much the same as revision 929343, the fix for "Use of uninitialized value in lc" in bug 6396, as referred to in comment 1.
Comment 7 Mark Martinec 2010-10-27 20:43:50 UTC
> The fix to this bug should be pretty much the same as revision 929343, the fix
> for "Use of uninitialized value in lc" in bug 6396, as referred to in comment
> 1.

trunk:
  Bug 6488 - Lint errors with Perl 5.12.1 in AntiVirus.pm
Sending lib/Mail/SpamAssassin/Plugin/AntiVirus.pm
Committed revision 1028149.

3.3 (trivial I suppose)
  Bug 6488 - Lint errors with Perl 5.12.1 in AntiVirus.pm
Sending lib/Mail/SpamAssassin/Plugin/AntiVirus.pm
Committed revision 1028151.
Comment 8 Mark Martinec 2010-10-27 20:47:47 UTC
Created attachment 4818 [details]
the diff (for reference)

the committed diff
Comment 9 Karsten Bräckelmann 2010-10-27 21:38:16 UTC
(In reply to comment #7)
> > The fix to this bug should be pretty much the same as revision 929343, the fix
> > for "Use of uninitialized value in lc" in bug 6396, as referred to in comment
> > 1.

> 3.3 (trivial I suppose)
>   Bug 6488 - Lint errors with Perl 5.12.1 in AntiVirus.pm
> Sending lib/Mail/SpamAssassin/Plugin/AntiVirus.pm
> Committed revision 1028151.

Thanks, Mark. :)  It was just too late for me to hit svn, especially with code I cannot possibly test, since I do not use it. Anyway...

+1  after code review, without testing it

And yes, I agree, probably trivial just as bug 6396 comment 1.
Comment 10 Kevin A. McGrail 2010-10-28 09:19:06 UTC
(In reply to comment #9)
> 
> +1  after code review, without testing it

+1 here as well for any and all purposes also without testing beyond a compilation validity.  I believe with votes from Mark (implied), Karsten and myself, that's a ready to commit.

KAM
Comment 11 Karsten Bräckelmann 2013-05-31 01:29:15 UTC
*** Bug 6941 has been marked as a duplicate of this bug. ***