lloyd / yajl

A fast streaming JSON parsing library in C.
http://lloyd.github.com/yajl
ISC License
2.15k stars 435 forks source link

Missing break in switch #236

Open dimitrov-ds opened 3 years ago

dimitrov-ds commented 3 years ago

Hi, I've just ran Coverity, version 2020.03, static analysis on Yajl 2.1.0 and it highlighted a potential issue. In the yajl_parser.c file, at line 404, the case for value "yajl_tok_right_bracket" is not terminated by a 'break' statement. I can see that there are number of other cases not terminated by a 'break' statement but there are comments for each of them saying that the fall through is intentional. The case I am mentioning in this issue does not have such a comment. Is the missing 'break' statement is intentional or it is a bug?

Thanks, Dimitar