bug-gnulib
[Top][All Lists]
Advanced

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

gnulib-tool.py: Fix some unbound variables.


From: Collin Funk
Subject: gnulib-tool.py: Fix some unbound variables.
Date: Tue, 9 Apr 2024 10:57:51 -0700
User-agent: Mozilla Thunderbird

In GLEmiter.autoconfSnippets I see many warnings that a 'solution'
variable may be unbound when it is used.

         if solution:  # Solution may be unbound here.
             emit += self.autoconfSnippet(module, toplevel,
                                          disable_libtool, disable_gettext, 
replace_auxdir, '  ')

It seems that the unbound variable will evaluate to 'False', which
would explain why it still works. Still not good practice. :)

This patch silences the warning by initializing solution to False at
the start of each loop. Easy fix.

Collin

Attachment: 0001-gnulib-tool.py-Fix-some-unbound-variables.patch
Description: Text Data


reply via email to

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