From 965745d85c7f10579b02a4b9c9f27000d436cfd0 Mon Sep 17 00:00:00 2001 From: Dimiter 'Arruor' Nikov Date: Wed, 28 Dec 2011 22:05:47 +0200 Subject: [PATCH] Fixing issue with unused variable in check_architecture subroutine. More info available at: https://github.com/rackerhacker/MySQLTuner-perl/issues/7 --- mysqltuner.pl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mysqltuner.pl b/mysqltuner.pl index f61881c..0d61533 100755 --- a/mysqltuner.pl +++ b/mysqltuner.pl @@ -463,7 +463,14 @@ sub mysql_version_ge { # Checks for 32-bit boxes with more than 2GB of RAM my ($arch); sub check_architecture { - if ($doremote eq 1) { return; } + if ($doremote eq 1) { + # Setting value for $arch variable to avoid warning about uninitialized + # variable (more details at https://github.com/rackerhacker/MySQLTuner-perl/issues/7) + # $id Dimiter "Arruor" Nikov exp + $arch = 0; + return; + } + if (`uname` =~ /SunOS/ && `isainfo -b` =~ /64/) { $arch = 64; goodprint "Operating on 64-bit architecture\n";