Re: [RFC PATCH 1/1] json-writer: incorrect format specifier

2018-03-27 Thread Jeff Hostetler
On 3/26/2018 11:26 PM, Ramsay Jones wrote: On 26/03/18 18:04, Junio C Hamano wrote: Ramsay Jones writes: [...] I must confess to not having given any thought to the wider implications of the code. I don't really know what this code is going to be used for.

Re: [RFC PATCH 1/1] json-writer: incorrect format specifier

2018-03-26 Thread Ramsay Jones
On 26/03/18 18:04, Junio C Hamano wrote: > Ramsay Jones writes: > @@ -120,7 +120,7 @@ void jw_object_uint64(struct json_writer *jw, const char *key, uint64_t value) maybe_add_comma(jw); append_quoted_string(>json, key); -

Re: [RFC PATCH 1/1] json-writer: incorrect format specifier

2018-03-26 Thread Jeff Hostetler
On 3/26/2018 1:04 PM, Junio C Hamano wrote: Ramsay Jones writes: @@ -120,7 +120,7 @@ void jw_object_uint64(struct json_writer *jw, const char *key, uint64_t value) maybe_add_comma(jw); append_quoted_string(>json, key); - strbuf_addf(>json,

Re: [RFC PATCH 1/1] json-writer: incorrect format specifier

2018-03-26 Thread Junio C Hamano
Ramsay Jones writes: >>> @@ -120,7 +120,7 @@ void jw_object_uint64(struct json_writer *jw, const >>> char *key, uint64_t value) >>> maybe_add_comma(jw); >>> >>> append_quoted_string(>json, key); >>> - strbuf_addf(>json, ":%"PRIuMAX, value); >>> +

Re: [RFC PATCH 1/1] json-writer: incorrect format specifier

2018-03-24 Thread Ramsay Jones
On 24/03/18 15:14, Ramsay Jones wrote: > > > On 24/03/18 05:37, Wink Saville wrote: >> In routines jw_object_uint64 and jw_object_double strbuf_addf is >> invoked with strbuf_addf(>json, ":%"PRIuMAX, value) where value >> is a uint64_t. This causes a compile error on OSX. >> >> The correct

Re: [RFC PATCH 1/1] json-writer: incorrect format specifier

2018-03-24 Thread Ramsay Jones
On 24/03/18 05:37, Wink Saville wrote: > In routines jw_object_uint64 and jw_object_double strbuf_addf is > invoked with strbuf_addf(>json, ":%"PRIuMAX, value) where value > is a uint64_t. This causes a compile error on OSX. > > The correct format specifier is PRIu64 instead of PRIuMax. > >

Re: [RFC PATCH 1/1] json-writer: incorrect format specifier

2018-03-24 Thread Jeff Hostetler
On 3/24/2018 1:37 AM, Wink Saville wrote: In routines jw_object_uint64 and jw_object_double strbuf_addf is invoked with strbuf_addf(>json, ":%"PRIuMAX, value) where value is a uint64_t. This causes a compile error on OSX. The correct format specifier is PRIu64 instead of PRIuMax.

[RFC PATCH 1/1] json-writer: incorrect format specifier

2018-03-23 Thread Wink Saville
In routines jw_object_uint64 and jw_object_double strbuf_addf is invoked with strbuf_addf(>json, ":%"PRIuMAX, value) where value is a uint64_t. This causes a compile error on OSX. The correct format specifier is PRIu64 instead of PRIuMax. Signed-off-by: Wink Saville ---