coverity/13750: Negative array index read: FP.

Problem    : Negative array index read @ 909.
Diagnostic : False positive.
Rationale  : Suggested error path assigns a negative value to idx at
             line 836 (`idx = find_command(ca.cmdchar);`). That's
             impossible, as `ca.cmdchar` is set to Ctrl_BSL just two
             lines above, so we know that value will be in the table.
Resolution : Assert idx >= 0.
This commit is contained in:
Eliseo Martínez 2015-01-26 21:28:41 +01:00 committed by Justin M. Keyes
parent 4d70aae770
commit 828a18722c

View File

@ -834,6 +834,7 @@ getcount:
ca.cmdchar = Ctrl_BSL;
ca.nchar = c;
idx = find_command(ca.cmdchar);
assert(idx >= 0);
}
}
}