Skip to content

Commit

Permalink
domains: c: fix use of unitialized variable
Browse files Browse the repository at this point in the history
_fill_empty was not updating the state with the value of line, so in
recursive calls it would fail the assert checking for its own
initialization.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
  • Loading branch information
utzig authored and jakobandersen committed Nov 7, 2020
1 parent e70fc22 commit 5488bda
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sphinx/domains/c.py
Original file line number Diff line number Diff line change
Expand Up @@ -1533,6 +1533,7 @@ def _fill_empty(self, declaration: ASTDeclaration, docname: str, line: int) -> N
self.declaration = declaration
self.declaration.symbol = self
self.docname = docname
self.line = line
self._assert_invariants()
# and symbol addition should be done as well
self._add_function_params()
Expand Down

0 comments on commit 5488bda

Please sign in to comment.