mesonbuild / wrapdb

New wrap requests
https://mesonbuild.com/Adding-new-projects-to-wrapdb.html
MIT License
77 stars 195 forks source link

jansson: -Wformat-invalid-specifier #1460

Closed patrickdowling closed 4 months ago

patrickdowling commented 6 months ago

Noticed this in passing and it reproduces in this repo. Apologies if I'm missing something obvious...

../subprojects/jansson-2.14/src/dump.c:238:65: warning: invalid conversion specifier 'P' [-Wformat-invalid-specifier]

AFAICT this comes from jansson/meson.build:58

cdata.set_quoted('JSON_INTEGER_FORMAT', 'PRId64')

so the resulting format string is ...%" "PRId64" which is not what we wanted given PRId64 is macro?

While poking around I found a related suggestion in the jansson repo to switch to intmax_t which might also make it easier.

FWIW

Host machine cpu family: x86_64
Host machine cpu: x86_64
jansson| C compiler for the host machine: ccache cc (clang 15.0.0 "Apple clang version 15.0.0 (clang-1500.1.0.2.5)")

Thanks!

neheb commented 4 months ago

fixed.

edit: eh mostly. macOS warns but should work otherwise.

patrickdowling commented 4 months ago

Thanks!