automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FYI: fix undefined warnings for recursively defined variables


From: Alexandre Duret-Lutz
Subject: Re: FYI: fix undefined warnings for recursively defined variables
Date: Thu, 10 Jul 2003 00:05:57 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

>>> "adl" == Alexandre Duret-Lutz <address@hidden> writes:

 adl> I'm checking this in.  I'm currently working on a new scheme to test
 adl> Automake's exit codes which should allow to distinguish Perl's errors
 adl> from Automake's error, and I discovered that issue by running
 adl> cond20.test manually.

 adl> 2003-07-02  Alexandre Duret-Lutz  <address@hidden>

 adl> * lib/Automake/Variable.pm (_traverse_variable_recursively_worker):
 adl> Do not return undef when a variable is recursively defined, this
 adl> causes warnings all over the place.  Return the empty string instead.

 adl> Index: lib/Automake/Variable.pm
 adl> ===================================================================
 adl> RCS file: /cvs/automake/automake/lib/Automake/Variable.pm,v
 adl> retrieving revision 1.6
 adl> diff -u -r1.6 Variable.pm
 adl> --- lib/Automake/Variable.pm      30 Jun 2003 06:35:55 -0000      1.6
 adl> +++ lib/Automake/Variable.pm      2 Jul 2003 21:49:23 -0000
 adl> @@ -1476,7 +1476,7 @@
 adl> if (defined $_vars_scanned{$var})
 adl> {
 adl> err_var $var, "variable `" . $var->name() . "' recursively defined";
 adl> -      return undef;
 adl> +      return "";
 adl> }
 adl> $_vars_scanned{$var} = 1;

This was wrong (traverse_variable_recursively does not always
return strings).  Here is a better fix.

2003-07-09  Alexandre Duret-Lutz  <address@hidden>

        * lib/Automake/Variable.pm (_traverse_variable_recursively_worker):
        Return the empty list on recursively defined variable.  This
        supersedes my change of 2003-07-02.

Index: lib/Automake/Variable.pm
===================================================================
RCS file: /cvs/automake/automake/lib/Automake/Variable.pm,v
retrieving revision 1.8
diff -u -r1.8 Variable.pm
--- lib/Automake/Variable.pm    6 Jul 2003 19:27:29 -0000       1.8
+++ lib/Automake/Variable.pm    9 Jul 2003 22:03:54 -0000
@@ -1486,7 +1486,7 @@
   if (defined $_vars_scanned{$var})
     {
       err_var $var, "variable `" . $var->name() . "' recursively defined";
-      return "";
+      return ();
     }
   $_vars_scanned{$var} = 1;
 

-- 
Alexandre Duret-Lutz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]