Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions addons/misra_9.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ def getChildByName(self, name):
def getNextValueElement(self, root):
current = self
while current != root:
if not current.parent:
return None
# Get next index of parent
i = current.parent.children.index(current) + 1
# Next index of parent exists
Expand Down
3 changes: 3 additions & 0 deletions addons/test/misra/misra-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,9 @@ void misra_9_struct_initializers() {
dummy_struct dsd[2][2] = { 1, 2, 3, 4 }; // 9.2
dummy_struct dse[3] = { {1,2}, {3,4}, [1] = {5,6} }; // 9.3 9.4
dummy_struct dsd[] = { [0] = 1 }; // 9.5

// Obsolete initialization syntax for GCC
struct1 os1 = { i1: 1, i2: 2 }; // 10.4 13.4
}

void misra_9_broken_initializers() {
Expand Down