Skip to contentSkip to conversation

mg-allocate: Fix an "uninitialized value" warning

PATCH In review Ian Jackson 2 participants 3 messages Apr 17, 2014 – Apr 22, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mg-allocate: Fix an "uninitialized value" warning

If $ok is 0, $got_shareix could be undef but would still be used for Info in the return value. Initialise it to "x".

---
 mg-allocate |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mg-allocate +1 -1
index 00182f7..fc1b394 100755
@@ -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}";
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/2 preseed_base: drop obsolete references to NetGateway and NetNetmask

NetGateway and NetNetmask are not honoured (their lines in the preseed file are commented out) and I'm not aware of anyone who sets them. They have been there from the dawn of time.

Removing them gets rid of this warning (which appears twice)
Use of uninitialized value in concatenation (.) or string at Osstest/Debian.pm line 432.

---
 Osstest/Debian.pm |    2 --
 1 file changed, 2 deletions(-)
Osstest/Debian.pm +0 -2
index 059858e..ab09abb 100644
@@ -459,8 +459,6 @@ d-i partman-crypto/confirm_nooverwrite true
 
 #d-i netcfg/disable_dhcp boolean true
 d-i netcfg/get_nameservers string $c{NetNameservers}
-#d-i netcfg/get_netmask string $c{NetNetmask}
-#d-i netcfg/get_gateway string $c{NetGateway}
 d-i netcfg/confirm_static boolean true
 d-i netcfg/get_domain string $c{TestHostDomain}
 d-i netcfg/wireless_wep string
Signature · 1 line
1.7.10.4