From: SourceForge.net <no...@so...> - 2006-01-24 14:42:18
|
Bugs item #1375282, was opened at 2005-12-07 12:55 Message generated for change (Comment added) made by dts12 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1375282&group_id=12694 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: perl Group: None >Status: Closed >Resolution: Accepted Priority: 5 Submitted By: Dmitry Karasik (int32) Assigned to: Nobody/Anonymous (nobody) Summary: SNMP.pm: warnings with "perl -w" Initial Comment: calls to SNMP::Session::gettable that are realized via snmp_getbulk(), warn the following error if the perl interpreter was run with -w: Use of uninitialized value in subroutine entry at /usr/local/lib/perl5/site_perl/5.8.5/mach/SNMP.pm line 894. The following patch fixes this issue: --- SNMP.xs Wed Dec 7 13:41:30 2005 +++ SNMP.xs Wed Dec 7 13:41:47 2005 @@ -3724,7 +3724,8 @@ *err_str_svp, *err_num_svp, *err_ind_svp); - if (SvIV(*hv_fetch((HV*)SvRV(sess_ref),"TimeStamp", 9, 1))) + if (SvIOK(*hv_fetch((HV*)SvRV(sess_ref),"TimeStamp", 9, 1)) && + SvIV(*hv_fetch((HV*)SvRV(sess_ref),"TimeStamp", 9, 1))) sv_timestamp = newSViv((IV)time(NULL)); av_clear(varlist); As a side note, I would suggest to add '-w' and 'use strict' whenever possible, for example, perl -w default_store/test.pl says 'Argument "DS_LIB_DEFAULT_PORT" isn't numeric in subroutine entry at test.pl line 88.', an error that you would probably never noticed otherwise. ---------------------------------------------------------------------- Comment By: Dave Shield (dts12) Date: 2006-01-24 14:42 Message: Logged In: YES user_id=88893 Thanks for the bug report! We've fixed the problem in the 5.1.x, 5.2.x and 5.3.x code branches and the main development tree, so it should be fixed in future releases of the net-snmp package. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1375282&group_id=12694 |