misra: Fix crash in misra_9.py when struct type is unknown and there is string initialization (#5233)
This commit is contained in:
parent
a04990d4e3
commit
80c42fcaf3
|
@ -255,7 +255,7 @@ class InitializerParser:
|
||||||
isFirstElement = False
|
isFirstElement = False
|
||||||
isDesignated = True
|
isDesignated = True
|
||||||
|
|
||||||
elif self.token.isString and self.ed.isArray:
|
elif self.token.isString and self.ed and self.ed.isArray:
|
||||||
self.ed.setInitialized(isDesignated)
|
self.ed.setInitialized(isDesignated)
|
||||||
if self.token == self.token.astParent.astOperand1 and self.token.astParent.astOperand2:
|
if self.token == self.token.astParent.astOperand1 and self.token.astParent.astOperand2:
|
||||||
self.token = self.token.astParent.astOperand2
|
self.token = self.token.astParent.astOperand2
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
|
static const struct id3_frametype wordlist[] =
|
||||||
|
{
|
||||||
|
{0, "Encryption method registration"},
|
||||||
|
{1, "Popularimeter"},
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in New Issue