[Libreoffice-commits] online.git: common/Util.hpp

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Mon Sep 16 11:52:32 UTC 2019


 common/Util.hpp |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a7362d52ac7b837fbe02efaef54aa5072eafa7bc
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Mon Sep 16 14:45:38 2019 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Sep 16 13:52:14 2019 +0200

    Use portable format conversion specifier for uint64_t
    
    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 <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>

diff --git a/common/Util.hpp b/common/Util.hpp
index c1a5141db..c1f799941 100644
--- a/common/Util.hpp
+++ b/common/Util.hpp
@@ -12,6 +12,7 @@
 
 #include <cassert>
 #include <cerrno>
+#include <cinttypes>
 #include <cstddef>
 #include <cstring>
 #include <atomic>
@@ -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);
     }
 


More information about the Libreoffice-commits mailing list