Skip to content

Commit

Permalink
Fix missing switch case
Browse files Browse the repository at this point in the history
`yajl_tok_comment` was not present in the switch case.

Warnings:

```
compiling ../../../../ext/yajl/yajl_lex.c
../../../../ext/yajl/yajl_lex.c:42:13: warning: enumeration value 'yajl_tok_comment' not handled in switch [-Wswitch]
    switch (tok) {
            ^
../../../../ext/yajl/yajl_lex.c:42:13: note: add missing switch cases
    switch (tok) {
            ^
```

Co-authored-by: John Hawthorn <john@hawthorn.email>
  • Loading branch information
eileencodes and jhawthorn committed Jun 24, 2021
1 parent 8daacc1 commit 22aa1e7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ext/yajl/yajl_lex.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const char *yajl_tok_name(yajl_tok tok) {
case yajl_tok_bool: return "bool";
case yajl_tok_colon: return "colon";
case yajl_tok_comma: return "comma";
case yajl_tok_comment: return "comment";
case yajl_tok_eof: return "eof";
case yajl_tok_error: return "error";
case yajl_tok_left_brace: return "open_array";
Expand Down

0 comments on commit 22aa1e7

Please sign in to comment.