#6 Fix printf format strings a bit better

Unstable (example)
closed
nobody
None
5
2015-06-14
2011-03-30
Christopher Head
No

Patch #293131 already does this, but by casting everything to int or unsigned int. Since these are size_ts, it's better to cast them to unsigned long and use %lu. This could especially make a difference on 64-bit platforms with 32-bit ints, such as amd64. The attached patch does this.

Discussion

  • The patch

     
    Attachments
  • Nicolas Dade
    Nicolas Dade
    2015-06-14

    Thanks for the patch.

    I think the cleanest is to use %zd and %zu, thus telling printf to use whatever size_t happens to be on this machine.

    However at the moment there is no value we are printing which is greater than a 1000 so it makes little difference.

    I've put this in https://github.com/nsd20463/pwsafe

     
  • Nicolas Dade
    Nicolas Dade
    2015-06-14

    • status: open --> closed
    • Group: --> Unstable (example)