kwo pushed a commit to branch master.

commit 3af56b9b3fb3415bd450163082f257601ae79dbc
Author: Kim Woelders <[email protected]>
Date:   Sat Jun 1 09:01:03 2013 +0200

    Fix various perl warnings.
---
 scripts/e_gen_menu | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/scripts/e_gen_menu b/scripts/e_gen_menu
index 5503bc2..b0bf9ef 100755
--- a/scripts/e_gen_menu
+++ b/scripts/e_gen_menu
@@ -24,6 +24,9 @@
 # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 ##############################################################################
 
+#use strict;
+#use warnings;
+
 # Likely  prefixes
 $Prefixes = "/usr/local:/usr:/opt:/opt/kde:$ENV{'KDEDIR'}";
 $Prefixes = "$Prefixes:/opt/kde3:/opt/gnome";  # SUSE
@@ -62,6 +65,7 @@ $EdirBin  = "/usr/bin" unless $EdirBin;
 $EdirMenus = "$EdirUser/menus";
 
 $dbg      = "$ENV{'E_MENUGEN_DBG'}";
+$dbg      = 0 unless $dbg;
 
 # Put EBIN first in path
 $ENV{'PATH'} = "$EdirBin:$ENV{'PATH'}";
@@ -175,8 +179,7 @@ sub MakeMenu {
 # Process a .desktop file
 sub ProcessFile {
        local $f = shift;
-       local $Name, $Exec, $Icon, $Cats, $Type, $Ndis, $File;
-       local $c;
+       local ($Name, $Exec, $Icon, $Cats, $Type, $Ndis, $File);
 
        if (! -f "$f")  {
                print "Not found: $f\n" if $dbg ge 1;
@@ -294,7 +297,7 @@ sub ProcessDir {
 sub ProcessOldStyle {
        local $t = shift;
        local $dl = shift;
-       local $d, $d2;
+       local ($d, $d2);
        local @d2l;
 
        foreach $d (split(':', $dl)) {
@@ -393,7 +396,7 @@ sub MakeEppsMenu {
 sub MakeAppsMenu {
        local $type = shift;
        local %menus;
-       local $c, $k, $dir;
+       local ($c, $k, $dir);
 
        $dir = "$EdirMenus/menus_$type";
        $mdir = "menus_$type";
@@ -465,7 +468,7 @@ foreach $d (split(':', $AppDirs)) {
                print "- Not found\n" if $dbg ge 1;
                next;
        }
-       ProcessDir($d);
+       ProcessDir($d, "", "");
 }
 
 # Make menu dir and scaled icon dir

-- 

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j

Reply via email to