From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [OSSTEST PATCH 1/2] mg-allocate: Fix an "uninitialized value" warning Date: Thu, 17 Apr 2014 16:14:54 +0100 Message-ID: <1397747695-9409-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wao25-0006XY-5Q for xen-devel@lists.xenproject.org; Thu, 17 Apr 2014 15:15:23 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org If $ok is 0, $got_shareix could be undef but would still be used for Info in the return value. Initialise it to "x". Signed-off-by: Ian Jackson --- mg-allocate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mg-allocate b/mg-allocate index 00182f7..fc1b394 100755 --- a/mg-allocate +++ b/mg-allocate @@ -103,7 +103,7 @@ END $resq->execute($restype, $resname); my $ok= 0; - my $got_shareix; + my $got_shareix = 'x'; while (my $candrow= $resq->fetchrow_hashref()) { my $desc= "$candrow->{restype}/$candrow->{resname}". "/$candrow->{shareix}"; -- 1.7.10.4