Skip to content

Commit d4426e0

Browse files
Adjust the format specifier based on the typedef for wg_yajl_integer_t. (#178)
1 parent ebd1f8b commit d4426e0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils_stackdriver_json.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@
3737

3838
#if HAVE_YAJL_V2
3939
typedef long long wg_yajl_integer_t;
40+
#define PRIyi "%lld"
4041
typedef size_t wg_yajl_size_t;
4142
#else
4243
typedef long wg_yajl_integer_t;
44+
#define PRIyi "%ld"
4345
typedef unsigned int wg_yajl_size_t;
4446
#endif
4547

@@ -193,7 +195,7 @@ static int summary_parse_string(void *c, const unsigned char *val,
193195
static int summary_parse_integer(void *c, wg_yajl_integer_t val) {
194196
parse_summary_t *ctx = (parse_summary_t *)c;
195197
log_context(ctx);
196-
DEBUG("integer: %lld", val);
198+
DEBUG("integer: " PRIyi, val);
197199
if (ctx->state.current_field == FIELD_TOTAL_POINT_COUNT) {
198200
if (ctx->response->total_point_count > 0) {
199201
DEBUG("totalPointCount was already set. Bug?");

0 commit comments

Comments
 (0)