]> Savannah Git Hosting - gnulib.git/commitdiff
announce-gen: avoid perl warnings
authorAssaf Gordon <assafgordon@gmail.com>
Wed, 9 Jul 2014 23:18:40 +0000 (19:18 -0400)
committerPádraig Brady <P@draigBrady.com>
Thu, 10 Jul 2014 19:16:43 +0000 (20:16 +0100)
* build-aux/announce-gen: add two minor checks to avoid
"use of uninitialized value" warnings when command-line parameters are
missing.

ChangeLog
build-aux/announce-gen

index 6c465134aa915466ad200b1934f8454e125c2e8a..02c667681ef0dd525a078659345a41d8c07360ba 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-07-10  Assaf Gordon  <assafgordon@gmail.com>
+
+       announce-gen: avoid perl warnings
+       * build-aux/announce-gen: add two minor checks to avoid
+       "use of uninitialized value" warnings when command-line parameters are
+       missing.
+
 2014-07-10  Assaf Gordon  <assafgordon@gmail.com>
 
        localename: avoid -Wsuggest-attribute={const,pure} warnings
index db9ed50a78f5e990ed3052a034be98d30ac9f460..a3aebf76220f3ad4b75c1ec8a9bb1f1b69ec7d19 100755 (executable)
@@ -416,14 +416,15 @@ sub get_tool_versions ($$)
   @url_dir_list
     or (warn "URL directory name(s) not specified\n"), $fail = 1;
 
-  my @tool_list = split ',', $bootstrap_tools;
+  my @tool_list = split ',', $bootstrap_tools
+    if $bootstrap_tools;
 
   grep (/^gnulib$/, @tool_list) ^ defined $gnulib_version
     and (warn "when specifying gnulib as a tool, you must also specify\n"
         . "--gnulib-version=V, where V is the result of running git describe\n"
         . "in the gnulib source directory.\n"), $fail = 1;
 
-  exists $valid_release_types{$release_type}
+  !$release_type || exists $valid_release_types{$release_type}
     or (warn "'$release_type': invalid release type\n"), $fail = 1;
 
   @ARGV