Skip to content

Commit

Permalink
Merge pull request #204 from eileencodes/fix-c-warnings
Browse files Browse the repository at this point in the history
Fix c warnings
  • Loading branch information
brianmario committed Jun 24, 2021
2 parents d5572cb + cb13d0e commit 7168bd7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ext/yajl/api/yajl_gen.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ extern "C" {
yajl_gen_invalid_number,
/** A print callback was passed in, so there is no internal
* buffer to get from */
yajl_gen_no_buf
yajl_gen_no_buf,
/** Tried to decrement at depth 0 */
yajl_depth_underflow
} yajl_gen_status;

/** an opaque handle to a generator */
Expand Down
2 changes: 1 addition & 1 deletion ext/yajl/yajl_gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ yajl_gen_free(yajl_gen g)
if (++(g->depth) >= YAJL_MAX_DEPTH) return yajl_max_depth_exceeded;

#define DECREMENT_DEPTH \
if (--(g->depth) >= YAJL_MAX_DEPTH) return yajl_gen_error;
if (--(g->depth) >= YAJL_MAX_DEPTH) return yajl_depth_underflow;

#define APPENDED_ATOM \
switch (g->state[g->depth]) { \
Expand Down
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 7168bd7

Please sign in to comment.