mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
binpac: Add a comment in the generated C++ code for fall through in switch
A common BinPAC construct for parsing records is a switch statement, with no breaks between the cases, as control is expected to fall through. Coverity raises an error about this; this commit should fix that.
This commit is contained in:
parent
a9d294528d
commit
dc49b0343f
1 changed files with 1 additions and 0 deletions
|
@ -446,6 +446,7 @@ void RecordDataField::GenParseCode(Output* out_cc, Env* env)
|
|||
out_cc->println("%s = %d;",
|
||||
env->LValue(parsing_state_id),
|
||||
parsing_state_seq());
|
||||
out_cc->println("/* fall through */");
|
||||
out_cc->dec_indent();
|
||||
out_cc->println("case %d:", parsing_state_seq());
|
||||
out_cc->inc_indent();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue