From d1e4a5a4a86c39698e82f9f1f86b5f11c2a313bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Lebel?= Date: Sun, 7 Apr 2013 03:20:48 +0200 Subject: [PATCH] 64bits --- json_object.c | 2 +- json_object.h | 2 +- json_util.c | 2 +- printbuf.c | 4 ++-- printbuf.h | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/json_object.c b/json_object.c index 053ac50..669602f 100644 --- a/json_object.c +++ b/json_object.c @@ -642,7 +642,7 @@ struct json_object* json_object_new_string(const char *s) return jso; } -struct json_object* json_object_new_string_len(const char *s, int len) +struct json_object* json_object_new_string_len(const char *s, size_t len) { struct json_object *jso = json_object_new(json_type_string); if(!jso) return NULL; diff --git a/json_object.h b/json_object.h index ca83129..1f8e1de 100644 --- a/json_object.h +++ b/json_object.h @@ -530,7 +530,7 @@ extern double json_object_get_double(struct json_object *obj); */ extern struct json_object* json_object_new_string(const char *s); -extern struct json_object* json_object_new_string_len(const char *s, int len); +extern struct json_object* json_object_new_string_len(const char *s, size_t len); /** Get the string value of a json_object * diff --git a/json_util.c b/json_util.c index 32913a7..5c9be66 100644 --- a/json_util.c +++ b/json_util.c @@ -242,7 +242,7 @@ int json_parse_int64(const char *buf, int64_t *retval) */ if (orig_has_neg != recheck_has_neg || strncmp(buf_sig_digits, buf_cmp_start, strlen(buf_cmp_start)) != 0 || - ((int)strlen(buf_sig_digits) != buf_cmp_len && + (strlen(buf_sig_digits) != buf_cmp_len && isdigit((int)buf_sig_digits[buf_cmp_len]) ) ) diff --git a/printbuf.c b/printbuf.c index df1cf6f..97b4d0f 100644 --- a/printbuf.c +++ b/printbuf.c @@ -88,9 +88,9 @@ size_t printbuf_memappend(struct printbuf *p, const char *buf, size_t size) return size; } -int printbuf_memset(struct printbuf *pb, int offset, int charvalue, int len) +int printbuf_memset(struct printbuf *pb, size_t offset, int charvalue, int len) { - int size_needed; + size_t size_needed; if (offset == -1) offset = pb->bpos; diff --git a/printbuf.h b/printbuf.h index 3a30a93..78029e1 100644 --- a/printbuf.h +++ b/printbuf.h @@ -22,7 +22,7 @@ extern "C" { struct printbuf { char *buf; - int bpos; + size_t bpos; size_t size; }; @@ -59,7 +59,7 @@ do { \ * If offset is -1, this starts at the end of the current data in the buffer. */ extern int -printbuf_memset(struct printbuf *pb, int offset, int charvalue, int len); +printbuf_memset(struct printbuf *pb, size_t offset, int charvalue, int len); extern int sprintbuf(struct printbuf *p, const char *msg, ...);