Skip to content

Commit

Permalink
Use portable format conversion specifier for uint64_t
Browse files Browse the repository at this point in the history
Avoids a warning when compiling for iOS: format specifies type
'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned
long long').

Change-Id: I8b5205dd0c3a8ae2f531f1647b3e3bac27ea6065
Reviewed-on: https://gerrit.libreoffice.org/78985
Reviewed-by: Tor Lillqvist <[email protected]>
Tested-by: Tor Lillqvist <[email protected]>
  • Loading branch information
Tor Lillqvist committed Sep 16, 2019
1 parent f892640 commit a7362d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/Util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <cassert>
#include <cerrno>
#include <cinttypes>
#include <cstddef>
#include <cstring>
#include <atomic>
Expand Down Expand Up @@ -761,7 +762,7 @@ int main(int argc, char**argv)
inline void vectorAppendHex(std::vector<char> &vector, uint64_t number)
{
char output[32];
sprintf(output, "%lx", number);
sprintf(output, "%" PRIx64, number);
vectorAppend(vector, output);
}

Expand Down

0 comments on commit a7362d5

Please sign in to comment.