Hi Greg, On Tue, 2025-01-21 at 09:45 +0100, Greg Kroah-Hartman wrote: > The perl expression: > exit $problems ? 1 : 0; > will now throw a warning with newer versions of perl: > Possible precedence issue with control flow operator (exit) at > /usr/bin/guards line 198. > as it properly catches that the control flow is NOT being evaluated > here. For more details on the issue, please see this 10-year-old perl > blog post: > > https://blogs.perl.org/users/buddy_burden/2014/06/when-a-failure-is-not-a-failure.html > > Fix this up by providing the proper "evaluate this expression and THEN > return the value" logic that the code was expecting: > > Signed-off-by: Greg Kroah-Hartman <[email protected]> > > diff --git a/bin/guards.in b/bin/guards.in > index 1c1605bbdbba..f6c4444bdf36 100644 > --- a/bin/guards.in > +++ b/bin/guards.in > @@ -195,7 +195,7 @@ if ($check) { > # This is not an error if the entries are mutually exclusive... > } > } > - exit $problems ? 1 : 0; > + exit ($problems ? 1 : 0); > > } elsif ($list) { > parse($fh, sub { >
Applied, thanks. I also fixed two similar issues in quilt/scripts/dependency-graph.in and test/run. -- Jean Delvare SUSE L3 Support _______________________________________________ Quilt-dev mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/quilt-dev
