pvr: csbgen: Fix "local variable may be undefined" lints
Signed-off-by: Matt Coster <matt.coster@imgtec.com> Reviewed-by: Frank Binns <frank.binns@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884>
This commit is contained in:
parent
9f8556a44a
commit
4c0941f0d4
|
@ -856,9 +856,6 @@ class Parser:
|
|||
self.filename = ""
|
||||
|
||||
def start_element(self, name: str, attrs: t.Dict[str, str]) -> None:
|
||||
if not name == "csbgen":
|
||||
parent = self.context[-1]
|
||||
|
||||
if name == "csbgen":
|
||||
if self.context:
|
||||
raise RuntimeError(
|
||||
|
@ -868,8 +865,11 @@ class Parser:
|
|||
|
||||
csbgen = Csbgen(attrs["name"], attrs["prefix"], self.filename)
|
||||
self.context.append(csbgen)
|
||||
return
|
||||
|
||||
elif name == "struct":
|
||||
parent = self.context[-1]
|
||||
|
||||
if name == "struct":
|
||||
struct = Struct(parent, attrs["name"], int(attrs["length"]))
|
||||
self.context.append(struct)
|
||||
|
||||
|
|
Loading…
Reference in New Issue