akheron / jansson

C library for encoding, decoding and manipulating JSON data
http://www.digip.org/jansson/
Other
3.05k stars 809 forks source link

Fix size_t related MSVC compiler warnings #555

Closed kiyolee closed 3 years ago

kiyolee commented 3 years ago

For Windows 64-bit build using MSVC, the fact that sizeof(long) != sizeof(size_t) would generate a fair bit compiler warnings. Using size_t consistently is a better approach than using long and size_t interchangeably. For printing size_t variables using printf(), It is also better to take advantage of C11 "%zd" if possible.

coveralls commented 3 years ago

Coverage Status

Coverage decreased (-0.7%) to 95.485% when pulling 638449c43dfdc0a37ef999dd349988cf294525e6 on kiyolee:size_t-warnings into a740f15c17ef7956b1493d8d1f800896c1e60bad on akheron:master.

akheron commented 3 years ago

Merged, thanks!