[Bug 222600] New: Useless use of string eq in void context at /usr/lib/perl5/vendor_perl/5.8.8/Bootloader/Core/GRUB.pm line 1383 (#1)
https://bugzilla.novell.com/show_bug.cgi?id=222600 Summary: Useless use of string eq in void context at /usr/lib/perl5/vendor_perl/5.8.8/Bootloader/Core/GRUB.pm line 1383 (#1) Product: openSUSE 10.2 Version: Beta 2 plus Platform: PowerPC OS/Version: Linux Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: jplack@novell.com ReportedBy: olh@novell.com QAContact: qa@suse.de 10.2rc1 on mac.suse.de inst-sys:~ # ./vcs.sh 210 < /dev/vcs1 ATTENTION: Starting shell... (use 'exit' to proceed) Welcome to the inst-sys on 10.10.11.145 2.6.18.2-16-ppc64 ppc64 inst-sys:/ # exit starting slpd to announce VNC... starting yast... Probing connected terminal... Initializing virtual console... Found a Linux console terminal on /dev/console (210 columns x 65 lines). starting VNC server... A log file will be written to: /var/log/YaST2/vncserver.log ... *** *** You can connect to 10.10.11.145, display :1 now with vncviewer *** Or use a Java capable browser on http://10.10.11.145:5801/ *** (When YaST2 is finished, close your VNC viewer and return to this window.) *** Starting YaST2 *** Useless use of string eq in void context at /usr/lib/perl5/vendor_perl/5.8.8/Bootloader/Core/GRUB.pm line 1383 (#1) (W void) You did something without a side effect in a context that does nothing with the return value, such as a statement that doesn't return a value from a block, or the left side of a scalar comma operator. Very often this points not to stupidity on your part, but a failure of Perl to parse your program the way you thought it would. For example, you'd get this if you mixed up your C precedence with Python precedence and said $one, $two = 1, 2; when you meant to say ($one, $two) = (1, 2); Another common error is to use ordinary parentheses to construct a list reference when you should be using square or curly brackets, for example, if you say $array = (1,2); when you should have said $array = [1,2]; The square brackets explicitly turn a list value into a scalar value, while parentheses do not. So when a parenthesized list is evaluated in a scalar context, the comma is treated like C's comma operator, which throws away the left argument, which is not what you want. See perlref for more on this. This warning will not be issued for numerical constants equal to 0 or 1 since they are often used in statements like 1 while sub_with_side_effects(); String constants that would normally evaluate to 0 or 1 are warned about. inst-sys:~ # -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=222600 ------- Comment #1 from olh@novell.com 2006-11-20 03:25 MST ------- Created an attachment (id=106198) --> (https://bugzilla.novell.com/attachment.cgi?id=106198&action=view) bug222600.tar.bz2 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=222600 olh@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Platform|PowerPC |All -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=222600 jplack@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED ------- Comment #2 from jplack@novell.com 2006-11-20 08:21 MST ------- Hate this perl code: After all this dosnot look that bad: my $noverify = ($type eq "other") or ( exists $sectinfo{"noverifyroot"} and defined $sectinfo{"noverifyroot"} and (delete($sectinfo{"noverifyroot"}) eq "true") ); -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=222600 ------- Comment #3 from olh@novell.com 2006-11-21 03:25 MST ------- limal-bootloader 1.2.4-5 perl-Bootloader 0.4.3-2 yast2-bootloader 2.14.6-2 happens still with these package versions -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=222600 jplack@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |DUPLICATE ------- Comment #4 from jplack@novell.com 2006-11-27 09:33 MST ------- *** This bug has been marked as a duplicate of bug 223909 *** -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=222600 ------- Comment #5 from snwint@novell.com 2006-11-27 10:00 MST ------- Please note that the code in comment 2 looks completely wrong. Unless of course, you want to achieve something really esoteric. 1) 'or'/'and' binds less than '='; you probably meant '||'/'&&' 2) delete() returns a element list, not the element itself; so I don't think 'delete() eq "true"' will ever match -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=222600 ------- Comment #6 from snwint@novell.com 2006-11-27 10:09 MST ------- ok, I take back 2) BTW, why not simply do: my $noverify = $type eq "other" || delete $sectinfo{"noverifyroot"}; -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=222600 ------- Comment #7 from jplack@novell.com 2006-11-27 12:30 MST ------- ah the precedence differs, thanks for the tip, have to go back to perl school then :-( -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=222600 Olaf Hering <olh@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Found By|Other |Development -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com