Open micmac1 opened 3 years ago
These format specifiers actually differ by platform. what os/arch are you targeting where you have issues here?
These format specifiers actually differ by platform. what os/arch are you targeting where you have issues here?
Hi there, Linux/OpenWrt, lots of targets (ppc, mips, mipsel, mips64, aarch64, arc...)
Regarding time_t see also https://github.com/signalwire/freeswitch/pull/1409 (where @crienzo asked you to review a while ago).
Regarding size_t the common answer on stackoveflow as to what format specifier to use seems to be use "z" when you're dealing with compilers supporting C99. You already use "z" elsewhere in the lib, so I figure it's fine.
Looks like this is probably the resolution to the issue I just created #117
Any reason it hasn't been committed yet? I was just preparing to create a PR with the same change from %lu to %zu for all of the strlen calls.
Shouldn't we have %zu
in all the places without a cast?
Hi Andrey,
Not sure what you mean. Can you be specific and provide an example?
Kind regards, Seb
Voting again that this be merged. Doesn't seem like anyone has had an objection in a year now.
Why do you cast variables?
Am 20. Dezember 2022 16:14:47 UTC schrieb Andrey Volk @.***>:
Why do you cast variables?
Because of Y2K38
Is there a way to fix the issue without casting?
Use "%zu" for size_t and cast time_t to (long long) before printing with "%lld". Fixes the below mentioned warnings.
time_t:
size_t:
Signed-off-by: Sebastian Kemper sebastian_ml@gmx.net