From afe37ebeab452f288d1bdb537b0a118be3342a54 Mon Sep 17 00:00:00 2001 From: mellor Date: Wed, 19 Nov 2014 17:34:04 -0500 Subject: [PATCH] initialize rc var in Table.pm and tabutils.pm to remove warnings when running xcatd in foreground --- perl-xCAT/xCAT/Table.pm | 2 +- xCAT-server/lib/xcat/plugins/tabutils.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index bbe2ddbc8..474e4c8d0 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -3837,7 +3837,7 @@ sub writeAllEntries } my $filename = shift; my $fh; - my $rc; + my $rc = 0; # open the file for write unless (open($fh," > $filename")) { my $msg="Unable to open $filename for write \n."; diff --git a/xCAT-server/lib/xcat/plugins/tabutils.pm b/xCAT-server/lib/xcat/plugins/tabutils.pm index 3001c0546..71f5cfe71 100644 --- a/xCAT-server/lib/xcat/plugins/tabutils.pm +++ b/xCAT-server/lib/xcat/plugins/tabutils.pm @@ -740,7 +740,7 @@ sub tabdump output_table($table,$cb,$tabh,$recs); } else { # dump to file - my $rc1; + my $rc1 = 0; my $fh; # check to see if you can open the file unless (open($fh," > $FILENAME")) {