misra: fix 9.x checking when string literals are used to initialize char arrays (#5234)
This commit is contained in:
parent
80c42fcaf3
commit
9c5275f514
|
@ -346,15 +346,9 @@ class InitializerParser:
|
||||||
parent = parent.parent
|
parent = parent.parent
|
||||||
isDesignated = False
|
isDesignated = False
|
||||||
|
|
||||||
if self.token.isString:
|
if self.token.isString and self.ed.parent.isArray:
|
||||||
if self.token == self.token.astParent.astOperand1 and self.token.astParent.astOperand2:
|
self.ed = self.ed.parent
|
||||||
self.token = self.token.astParent.astOperand2
|
self.unwindAndContinue()
|
||||||
self.ed.markAsCurrent()
|
|
||||||
self.ed = self.root.getNextChild()
|
|
||||||
else:
|
|
||||||
self.unwindAndContinue()
|
|
||||||
else:
|
|
||||||
self.unwindAndContinue()
|
|
||||||
|
|
||||||
def pushToRootStackAndMarkAsDesignated(self):
|
def pushToRootStackAndMarkAsDesignated(self):
|
||||||
new = self.ed.parent
|
new = self.ed.parent
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
|
||||||
|
struct three_d_filter_t {
|
||||||
|
char name[16];
|
||||||
|
double elem[2];
|
||||||
|
};
|
||||||
|
|
||||||
|
static three_d_filter_t base_filters[] = {
|
||||||
|
{"Identity", { 1.0, 0.0 } },
|
||||||
|
{"Echo", { 0.4, 0.0 } }
|
||||||
|
};
|
Loading…
Reference in New Issue