git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Wink Saville <wink@saville.com>
Date
Mar 24, 2018, 05:37 UTC
Message-ID
<cover.1521868951.git.wink@saville.com>

Building the pu branch at commit 8b49f5c076c using Travis-CI all of the linux builds are green but the two OSX builds are red[1] and the logs show compile errors:

    CC ident.o
    CC json-writer.o
json-writer.c:123:38:  error:  format specifies type 'uintmax_t' (aka 'unsigned long') but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
        strbuf_addf(&jw->json, ":%"PRIuMAX, value);
                                 ~~         ^~~~~
json-writer.c:228:37:  error:  format specifies type 'uintmax_t' (aka 'unsigned long') but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat] [0m
        strbuf_addf(&jw->json, "%"PRIuMAX, value);
                                ~~         ^~~~~
2 errors generated.
make: *** [json-writer.o] Error 1
make: *** Waiting for unfinished jobs....

[RFC Patch 1/1] changes the PRIuMax to PRIu64 to correct the compile error and now Travis-CI is green [2].

[1]: https://travis-ci.org/winksaville/git/builds/357660624 [2]: https://travis-ci.org/winksaville/git/builds/357681929

Wink Saville (1):
  json-writer: incorrect format specifier
 json-writer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-- 
2.16.2
Next: Wink Saville
Message 1 of 12 in “json-writer: incorrect format specifier”
  1. 0/1 json-writer: incorrect format specifierWink Saville, Mar 24, 2018
  2. 1/1 json-writer: incorrect format specifierWink Saville, Mar 24, 2018
  3. Jeff HostetlerMar 24, 2018
  4. Ramsay JonesMar 24, 2018
  5. Ramsay JonesMar 24, 2018
  6. Junio C HamanoMar 26, 2018
  7. Jeff HostetlerMar 26, 2018
  8. Ramsay JonesMar 27, 2018
  9. Jeff HostetlerMar 27, 2018
  10. 0/1 json-writer: add cast to uintmax_tWink Saville, Mar 24, 2018
  11. 1/1 json-writer: add cast to uintmax_tWink Saville, Mar 24, 2018
  12. Jeff HostetlerMar 26, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.