Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lua_cjson.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,8 @@ static void json_append_newline_and_indent(strbuf_t *json, json_config_t *cfg, i
static void json_append_array(lua_State *l, json_config_t *cfg, int current_depth,
strbuf_t *json, int array_length, int raw)
{
int comma, i, json_pos, err;
int comma, i, err;
size_t json_pos;
int has_items = 0;

strbuf_append_char(json, '[');
Expand Down Expand Up @@ -1024,7 +1025,8 @@ static int cmp_key_entries(const void *a, const void *b)
static void json_append_object(lua_State *l, json_config_t *cfg,
int current_depth, strbuf_t *json)
{
int comma, keytype, json_pos, err;
int comma, keytype, err;
size_t json_pos;
int has_items = 0;
keybuf_t *keybuf;
key_entry_t key_entry;
Expand Down
4 changes: 2 additions & 2 deletions strbuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static char *strbuf_string(strbuf_t *s, size_t *len);
static void strbuf_ensure_empty_length(strbuf_t *s, size_t len);
static char *strbuf_empty_ptr(strbuf_t *s);
static void strbuf_extend_length(strbuf_t *s, size_t len);
static void strbuf_set_length(strbuf_t *s, int len);
static void strbuf_set_length(strbuf_t *s, size_t len);

/* Update */
static void strbuf_append_mem(strbuf_t *s, const char *c, size_t len);
Expand Down Expand Up @@ -101,7 +101,7 @@ static inline char *strbuf_empty_ptr(strbuf_t *s)
return s->buf + s->length;
}

static inline void strbuf_set_length(strbuf_t *s, int len)
static inline void strbuf_set_length(strbuf_t *s, size_t len)
{
s->length = len;
}
Expand Down