[arch-commits] Commit in libreoffice-online/trunk (PKGBUILD build-fix.patch)

Sergej Pupykin spupykin at archlinux.org
Mon May 29 17:03:49 UTC 2017


    Date: Monday, May 29, 2017 @ 17:03:47
  Author: spupykin
Revision: 230938

upgpkg: libreoffice-online 2.1.1-1

Added:
  libreoffice-online/trunk/build-fix.patch
Modified:
  libreoffice-online/trunk/PKGBUILD

-----------------+
 PKGBUILD        |   23 +-
 build-fix.patch |  458 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 470 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-05-29 17:02:20 UTC (rev 230937)
+++ PKGBUILD	2017-05-29 17:03:47 UTC (rev 230938)
@@ -10,34 +10,35 @@
 arch=('x86_64' 'i686')
 url="https://cgit.freedesktop.org/libreoffice/online/"
 license=("MPL")
-makedepends=("cppunit" "poco" "libreoffice-fresh-sdk" "jake" "npm" "chrpath")
-depends=("libpng12" "poco" "pcre" "cpio" "libreoffice")
+makedepends=("cppunit" "poco" "libreoffice-fresh-sdk" "jake" "npm" "chrpath" "python-polib")
+depends=("libpng12" "poco" "pcre" "cpio" "libreoffice" "openssl-1.0")
 backup=("etc/loolwsd/loolwsd.xml")
 install="libreoffice-online.install"
-
 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/LibreOffice/online/archive/${pkgver}.tar.gz"
-	"loolwsd.service")
+	"loolwsd.service"
+	"build-fix.patch")
 sha512sums=('fbb939631e9938800389e09842cf0bf079c0c2907f93ba13cc2e1c2dc4950f36a7206f2145c9f905c916820fed4fcd02b1b72765f0d299df804b67d82e3d045f'
-            '71fd3aec864b1f084dafc602a7fadc91fed146b57dba8cacc7bc277a42f197616a6a43c07d13e2e74a604166cd691a81f5c7de447ddecb680919e3f6b451adb6')
+            '71fd3aec864b1f084dafc602a7fadc91fed146b57dba8cacc7bc277a42f197616a6a43c07d13e2e74a604166cd691a81f5c7de447ddecb680919e3f6b451adb6'
+            'c39fbba5d5f46e201b7db8dceb4af305e4210894aca7c2d7282af13ad1878f57065bbc7329ac69c52de10a7d5661f2697ea2156d9f275045a03737dc240ccbba')
 
 prepare() {
   cd "${srcdir}/online-${pkgver}"
-  sed -i '1,1i#include <sys/sysmacros.h>' kit/Kit.cpp
-#  sed -i 's|120UL|120U|g' common/Protocol.hpp
-#  sed -i 's|-Werror||g' configure.ac
+  patch -p1 <"$srcdir"/build-fix.patch
 }
 
 build() {
   cd "${srcdir}/online-${pkgver}"
   ./autogen.sh
-  ./configure --enable-silent-rules \
+  export PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig
+  CPPFLAGS="-I/usr/include/openssl-1.0" \
+  CFLAGS="-I/usr/include/openssl-1.0" \
+  LDFLAGS="-L/usr/lib/openssl-1.0" \
+      ./configure --enable-silent-rules \
 	--with-lokit-path=/usr/include/libreoffice \
 	--with-lo-path=/usr/lib/libreoffice \
 	--prefix=/usr \
 	--sysconfdir=/etc
   BUILDING_FROM_RPMBUILD=yes make
-  cd loleaflet
-  make
 }
 
 package() {

Added: build-fix.patch
===================================================================
--- build-fix.patch	                        (rev 0)
+++ build-fix.patch	2017-05-29 17:03:47 UTC (rev 230938)
@@ -0,0 +1,458 @@
+diff -wbBur online-2.1.1/common/Protocol.cpp online-2.1.1.q/common/Protocol.cpp
+--- online-2.1.1/common/Protocol.cpp	2017-05-18 22:03:26.000000000 +0300
++++ online-2.1.1.q/common/Protocol.cpp	2017-05-29 17:57:28.305871286 +0300
+@@ -17,7 +17,7 @@
+ #include <string>
+ 
+ #define LOK_USE_UNSTABLE_API
+-#include <LibreOfficeKit/LibreOfficeKitEnums.h>
++#include "../bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h"
+ 
+ #include <Poco/StringTokenizer.h>
+ 
+diff -wbBur online-2.1.1/common/Protocol.hpp online-2.1.1.q/common/Protocol.hpp
+--- online-2.1.1/common/Protocol.hpp	2017-05-18 22:03:26.000000000 +0300
++++ online-2.1.1.q/common/Protocol.hpp	2017-05-29 17:57:28.305871286 +0300
+@@ -22,7 +22,7 @@
+ #include <Poco/Net/WebSocket.h>
+ 
+ #define LOK_USE_UNSTABLE_API
+-#include <LibreOfficeKit/LibreOfficeKitEnums.h>
++#include "../bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h"
+ 
+ namespace LOOLProtocol
+ {
+@@ -265,7 +265,7 @@
+ 
+     inline std::string getAbbreviatedMessage(const std::string& message)
+     {
+-        const auto pos = getDelimiterPosition(message.data(), std::min(message.size(), 500UL), '\n');
++        const auto pos = getDelimiterPosition(message.data(), std::min(message.size(), (unsigned int)500UL), '\n');
+ 
+         // If first line is less than the length (minus newline), add ellipsis.
+         if (pos < static_cast<std::string::size_type>(message.size()) - 1)
+diff -wbBur online-2.1.1/common/Seccomp.cpp online-2.1.1.q/common/Seccomp.cpp
+--- online-2.1.1/common/Seccomp.cpp	2017-05-18 22:03:26.000000000 +0300
++++ online-2.1.1.q/common/Seccomp.cpp	2017-05-29 19:29:09.912474712 +0300
+@@ -36,6 +36,12 @@
+ #if defined(__x86_64__)
+ #  define AUDIT_ARCH_NR AUDIT_ARCH_X86_64
+ #  define REG_SYSCALL   REG_RAX
++#elif defined(__i386__)
++#  define AUDIT_ARCH_NR AUDIT_ARCH_I386
++#  define REG_SYSCALL   REG_EAX
++#elif defined(__arm__)
++#  define AUDIT_ARCH_NR AUDIT_ARCH_ARM
++#  define REG_SYSCALL   REG_R7
+ #else
+ #  error "Platform does not support seccomp filtering yet - unsafe."
+ #endif
+@@ -129,12 +135,16 @@
+         KILL_SYSCALL(sendfile),
+         KILL_SYSCALL(shutdown),
+         KILL_SYSCALL(listen),  // server sockets
++#ifdef __NR_accept
+         KILL_SYSCALL(accept),  // server sockets
++#endif
+ #if 0
+         KILL_SYSCALL(wait4),
+ #endif
+         KILL_SYSCALL(kill),   // !
++#ifdef __NR_shmctl
+         KILL_SYSCALL(shmctl),
++#endif
+         KILL_SYSCALL(ptrace), // tracing
+         KILL_SYSCALL(capset),
+         KILL_SYSCALL(uselib),
+diff -wbBur online-2.1.1/common/Util.hpp online-2.1.1.q/common/Util.hpp
+--- online-2.1.1/common/Util.hpp	2017-05-18 22:03:26.000000000 +0300
++++ online-2.1.1.q/common/Util.hpp	2017-05-29 17:57:28.305871286 +0300
+@@ -25,7 +25,7 @@
+ #include <Poco/RegularExpression.h>
+ 
+ #define LOK_USE_UNSTABLE_API
+-#include <LibreOfficeKit/LibreOfficeKitEnums.h>
++#include "../bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h"
+ 
+ namespace Util
+ {
+diff -wbBur online-2.1.1/kit/ChildSession.cpp online-2.1.1.q/kit/ChildSession.cpp
+--- online-2.1.1/kit/ChildSession.cpp	2017-05-18 22:03:26.000000000 +0300
++++ online-2.1.1.q/kit/ChildSession.cpp	2017-05-29 17:57:28.305871286 +0300
+@@ -19,6 +19,8 @@
+ #include <Poco/StringTokenizer.h>
+ #include <Poco/URI.h>
+ 
++#include "../bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h"
++
+ #include "common/FileUtil.hpp"
+ #include "KitHelper.hpp"
+ #include "Log.hpp"
+diff -wbBur online-2.1.1/kit/DummyLibreOfficeKit.cpp online-2.1.1.q/kit/DummyLibreOfficeKit.cpp
+--- online-2.1.1/kit/DummyLibreOfficeKit.cpp	2017-05-18 22:03:26.000000000 +0300
++++ online-2.1.1.q/kit/DummyLibreOfficeKit.cpp	2017-05-29 17:57:28.305871286 +0300
+@@ -14,7 +14,7 @@
+ #include <cstring>
+ #include <memory>
+ 
+-#include <LibreOfficeKit/LibreOfficeKitEnums.h>
++#include "../bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h"
+ #include <LibreOfficeKit/LibreOfficeKitTypes.h>
+ 
+ struct LibLODocument_Impl : public _LibreOfficeKitDocument
+diff -wbBur online-2.1.1/kit/Kit.cpp online-2.1.1.q/kit/Kit.cpp
+--- online-2.1.1/kit/Kit.cpp	2017-05-18 22:03:26.000000000 +0300
++++ online-2.1.1.q/kit/Kit.cpp	2017-05-29 17:57:28.305871286 +0300
+@@ -1,3 +1,4 @@
++#include <sys/sysmacros.h>
+ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+ /*
+  * This file is part of the LibreOffice project.
+diff -wbBur online-2.1.1/kit/KitHelper.hpp online-2.1.1.q/kit/KitHelper.hpp
+--- online-2.1.1/kit/KitHelper.hpp	2017-05-18 22:03:26.000000000 +0300
++++ online-2.1.1.q/kit/KitHelper.hpp	2017-05-29 17:57:28.305871286 +0300
+@@ -14,7 +14,7 @@
+ #include <string>
+ 
+ #define LOK_USE_UNSTABLE_API
+-#include <LibreOfficeKit/LibreOfficeKitEnums.h>
++#include "../bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h"
+ 
+ namespace LOKitHelper
+ {
+@@ -113,7 +113,8 @@
+             return "INVALIDATE_HEADER";
+         case LOK_CALLBACK_CELL_ADDRESS:
+             return "CELL_ADDRESS";
+-
++        default:
++            break;
+        }
+ 
+         return std::to_string(type);
+diff -wbBur online-2.1.1/net/WebSocketHandler.hpp online-2.1.1.q/net/WebSocketHandler.hpp
+--- online-2.1.1/net/WebSocketHandler.hpp	2017-05-18 22:03:26.000000000 +0300
++++ online-2.1.1.q/net/WebSocketHandler.hpp	2017-05-29 17:58:29.125870587 +0300
+@@ -358,14 +358,14 @@
+         else
+         {
+             out.push_back((char)127);
+-            out.push_back(static_cast<char>((len >> 56) & 0xff));
+-            out.push_back(static_cast<char>((len >> 48) & 0xff));
+-            out.push_back(static_cast<char>((len >> 40) & 0xff));
+-            out.push_back(static_cast<char>((len >> 32) & 0xff));
+-            out.push_back(static_cast<char>((len >> 24) & 0xff));
+-            out.push_back(static_cast<char>((len >> 16) & 0xff));
+-            out.push_back(static_cast<char>((len >> 8) & 0xff));
+-            out.push_back(static_cast<char>((len >> 0) & 0xff));
++            out.push_back(static_cast<char>(((uint64_t)len >> 56) & 0xff));
++            out.push_back(static_cast<char>(((uint64_t)len >> 48) & 0xff));
++            out.push_back(static_cast<char>(((uint64_t)len >> 40) & 0xff));
++            out.push_back(static_cast<char>(((uint64_t)len >> 32) & 0xff));
++            out.push_back(static_cast<char>(((uint64_t)len >> 24) & 0xff));
++            out.push_back(static_cast<char>(((uint64_t)len >> 16) & 0xff));
++            out.push_back(static_cast<char>(((uint64_t)len >> 8) & 0xff));
++            out.push_back(static_cast<char>(((uint64_t)len >> 0) & 0xff));
+         }
+ 
+         // Copy the data.
+diff -wbBur online-2.1.1/test/TileQueueTests.cpp online-2.1.1.q/test/TileQueueTests.cpp
+--- online-2.1.1/test/TileQueueTests.cpp	2017-05-18 22:03:26.000000000 +0300
++++ online-2.1.1.q/test/TileQueueTests.cpp	2017-05-29 19:38:13.742468460 +0300
+@@ -281,7 +281,7 @@
+ 
+     // Empty queue
+     CPPUNIT_ASSERT_EQUAL(false, queue.dequeue(item));
+-    CPPUNIT_ASSERT_EQUAL(0UL, queue.size());
++    CPPUNIT_ASSERT_EQUAL(0UL, (unsigned long)queue.size());
+ 
+     const std::vector<std::string> messages =
+     {
+@@ -295,21 +295,21 @@
+         queue.enqueue(std::make_shared<Message>(msg, Message::Dir::Out));
+     }
+ 
+-    CPPUNIT_ASSERT_EQUAL(3UL, queue.size());
++    CPPUNIT_ASSERT_EQUAL(3UL, (unsigned long)queue.size());
+ 
+     CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item));
+-    CPPUNIT_ASSERT_EQUAL(2UL, queue.size());
++    CPPUNIT_ASSERT_EQUAL(2UL, (unsigned long)queue.size());
+     CPPUNIT_ASSERT_EQUAL(messages[0], std::string(item->data().data(), item->data().size()));
+ 
+     CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item));
+-    CPPUNIT_ASSERT_EQUAL(1UL, queue.size());
++    CPPUNIT_ASSERT_EQUAL(1UL, (unsigned long)queue.size());
+     CPPUNIT_ASSERT_EQUAL(messages[1], std::string(item->data().data(), item->data().size()));
+ 
+     CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item));
+-    CPPUNIT_ASSERT_EQUAL(0UL, queue.size());
++    CPPUNIT_ASSERT_EQUAL(0UL, (unsigned long)queue.size());
+     CPPUNIT_ASSERT_EQUAL(messages[2], std::string(item->data().data(), item->data().size()));
+ 
+-    CPPUNIT_ASSERT_EQUAL(0UL, queue.size());
++    CPPUNIT_ASSERT_EQUAL(0UL, (unsigned long)queue.size());
+ }
+ 
+ void TileQueueTests::testSenderQueueTileDeduplication()
+@@ -320,7 +320,7 @@
+ 
+     // Empty queue
+     CPPUNIT_ASSERT_EQUAL(false, queue.dequeue(item));
+-    CPPUNIT_ASSERT_EQUAL(0UL, queue.size());
++    CPPUNIT_ASSERT_EQUAL(0UL, (unsigned long)queue.size());
+ 
+     const std::vector<std::string> part_messages =
+     {
+@@ -334,12 +334,12 @@
+         queue.enqueue(std::make_shared<Message>(msg, Message::Dir::Out));
+     }
+ 
+-    CPPUNIT_ASSERT_EQUAL(3UL, queue.size());
++    CPPUNIT_ASSERT_EQUAL(3UL, (unsigned long)queue.size());
+     CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item));
+     CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item));
+     CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item));
+ 
+-    CPPUNIT_ASSERT_EQUAL(0UL, queue.size());
++    CPPUNIT_ASSERT_EQUAL(0UL, (unsigned long)queue.size());
+ 
+     const std::vector<std::string> dup_messages =
+     {
+@@ -353,13 +353,13 @@
+         queue.enqueue(std::make_shared<Message>(msg, Message::Dir::Out));
+     }
+ 
+-    CPPUNIT_ASSERT_EQUAL(1UL, queue.size());
++    CPPUNIT_ASSERT_EQUAL(1UL, (unsigned long)queue.size());
+     CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item));
+ 
+     // The last one should persist.
+     CPPUNIT_ASSERT_EQUAL(dup_messages[2], std::string(item->data().data(), item->data().size()));
+ 
+-    CPPUNIT_ASSERT_EQUAL(0UL, queue.size());
++    CPPUNIT_ASSERT_EQUAL(0UL, (unsigned long)queue.size());
+ }
+ 
+ void TileQueueTests::testInvalidateViewCursorDeduplication()
+@@ -370,7 +370,7 @@
+ 
+     // Empty queue
+     CPPUNIT_ASSERT_EQUAL(false, queue.dequeue(item));
+-    CPPUNIT_ASSERT_EQUAL(0UL, queue.size());
++    CPPUNIT_ASSERT_EQUAL(0UL, (unsigned long)queue.size());
+ 
+     const std::vector<std::string> view_messages =
+     {
+@@ -384,21 +384,21 @@
+         queue.enqueue(std::make_shared<Message>(msg, Message::Dir::Out));
+     }
+ 
+-    CPPUNIT_ASSERT_EQUAL(3UL, queue.size());
++    CPPUNIT_ASSERT_EQUAL(3UL, (unsigned long)queue.size());
+ 
+     CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item));
+-    CPPUNIT_ASSERT_EQUAL(2UL, queue.size());
++    CPPUNIT_ASSERT_EQUAL(2UL, (unsigned long)queue.size());
+     CPPUNIT_ASSERT_EQUAL(view_messages[0], std::string(item->data().data(), item->data().size()));
+ 
+     CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item));
+-    CPPUNIT_ASSERT_EQUAL(1UL, queue.size());
++    CPPUNIT_ASSERT_EQUAL(1UL, (unsigned long)queue.size());
+     CPPUNIT_ASSERT_EQUAL(view_messages[1], std::string(item->data().data(), item->data().size()));
+ 
+     CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item));
+-    CPPUNIT_ASSERT_EQUAL(0UL, queue.size());
++    CPPUNIT_ASSERT_EQUAL(0UL, (unsigned long)queue.size());
+     CPPUNIT_ASSERT_EQUAL(view_messages[2], std::string(item->data().data(), item->data().size()));
+ 
+-    CPPUNIT_ASSERT_EQUAL(0UL, queue.size());
++    CPPUNIT_ASSERT_EQUAL(0UL, (unsigned long)queue.size());
+ 
+     const std::vector<std::string> dup_messages =
+     {
+@@ -412,13 +412,13 @@
+         queue.enqueue(std::make_shared<Message>(msg, Message::Dir::Out));
+     }
+ 
+-    CPPUNIT_ASSERT_EQUAL(1UL, queue.size());
++    CPPUNIT_ASSERT_EQUAL(1UL, (unsigned long)queue.size());
+     CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item));
+ 
+     // The last one should persist.
+     CPPUNIT_ASSERT_EQUAL(dup_messages[2], std::string(item->data().data(), item->data().size()));
+ 
+-    CPPUNIT_ASSERT_EQUAL(0UL, queue.size());
++    CPPUNIT_ASSERT_EQUAL(0UL, (unsigned long)queue.size());
+ }
+ 
+ void TileQueueTests::testCallbackInvalidation()
+diff -wbBur online-2.1.1/test/WhiteBoxTests.cpp online-2.1.1.q/test/WhiteBoxTests.cpp
+--- online-2.1.1/test/WhiteBoxTests.cpp	2017-05-18 22:03:26.000000000 +0300
++++ online-2.1.1.q/test/WhiteBoxTests.cpp	2017-05-29 19:46:37.935795998 +0300
+@@ -80,53 +80,53 @@
+     CPPUNIT_ASSERT(LOOLProtocol::getTokenKeywordFromMessage(message, "mumble", map, mumble));
+     CPPUNIT_ASSERT_EQUAL(2, mumble);
+ 
+-    CPPUNIT_ASSERT_EQUAL(1UL, Util::trimmed("A").size());
++    CPPUNIT_ASSERT_EQUAL(1UL, (unsigned long)Util::trimmed("A").size());
+     CPPUNIT_ASSERT_EQUAL(std::string("A"), Util::trimmed("A"));
+ 
+-    CPPUNIT_ASSERT_EQUAL(1UL, Util::trimmed(" X").size());
++    CPPUNIT_ASSERT_EQUAL(1UL, (unsigned long)Util::trimmed(" X").size());
+     CPPUNIT_ASSERT_EQUAL(std::string("X"), Util::trimmed(" X"));
+ 
+-    CPPUNIT_ASSERT_EQUAL(1UL, Util::trimmed("Y ").size());
++    CPPUNIT_ASSERT_EQUAL(1UL, (unsigned long)Util::trimmed("Y ").size());
+     CPPUNIT_ASSERT_EQUAL(std::string("Y"), Util::trimmed("Y "));
+ 
+-    CPPUNIT_ASSERT_EQUAL(1UL, Util::trimmed(" Z ").size());
++    CPPUNIT_ASSERT_EQUAL(1UL, (unsigned long)Util::trimmed(" Z ").size());
+     CPPUNIT_ASSERT_EQUAL(std::string("Z"), Util::trimmed(" Z "));
+ 
+-    CPPUNIT_ASSERT_EQUAL(0UL, Util::trimmed(" ").size());
++    CPPUNIT_ASSERT_EQUAL(0UL, (unsigned long)Util::trimmed(" ").size());
+     CPPUNIT_ASSERT_EQUAL(std::string(""), Util::trimmed(" "));
+ 
+-    CPPUNIT_ASSERT_EQUAL(0UL, Util::trimmed("   ").size());
++    CPPUNIT_ASSERT_EQUAL(0UL, (unsigned long)Util::trimmed("   ").size());
+     CPPUNIT_ASSERT_EQUAL(std::string(""), Util::trimmed("   "));
+ 
+     std::string s;
+ 
+     s = "A";
+-    CPPUNIT_ASSERT_EQUAL(1UL, Util::trim(s).size());
++    CPPUNIT_ASSERT_EQUAL(1UL, (unsigned long)Util::trim(s).size());
+     s = "A";
+     CPPUNIT_ASSERT_EQUAL(std::string("A"), Util::trim(s));
+ 
+     s = " X";
+-    CPPUNIT_ASSERT_EQUAL(1UL, Util::trim(s).size());
++    CPPUNIT_ASSERT_EQUAL(1UL, (unsigned long)Util::trim(s).size());
+     s = " X";
+     CPPUNIT_ASSERT_EQUAL(std::string("X"), Util::trim(s));
+ 
+     s = "Y ";
+-    CPPUNIT_ASSERT_EQUAL(1UL, Util::trim(s).size());
++    CPPUNIT_ASSERT_EQUAL(1UL, (unsigned long)Util::trim(s).size());
+     s = "Y ";
+     CPPUNIT_ASSERT_EQUAL(std::string("Y"), Util::trim(s));
+ 
+     s = " Z ";
+-    CPPUNIT_ASSERT_EQUAL(1UL, Util::trim(s).size());
++    CPPUNIT_ASSERT_EQUAL(1UL, (unsigned long)Util::trim(s).size());
+     s = " Z ";
+     CPPUNIT_ASSERT_EQUAL(std::string("Z"), Util::trim(s));
+ 
+     s = " ";
+-    CPPUNIT_ASSERT_EQUAL(0UL, Util::trim(s).size());
++    CPPUNIT_ASSERT_EQUAL(0UL, (unsigned long)Util::trim(s).size());
+     s = " ";
+     CPPUNIT_ASSERT_EQUAL(std::string(""), Util::trim(s));
+ 
+     s = "   ";
+-    CPPUNIT_ASSERT_EQUAL(0UL, Util::trim(s).size());
++    CPPUNIT_ASSERT_EQUAL(0UL, (unsigned long)Util::trim(s).size());
+     s = "   ";
+     CPPUNIT_ASSERT_EQUAL(std::string(""), Util::trim(s));
+ }
+@@ -162,51 +162,51 @@
+     std::vector<std::string> tokens;
+ 
+     tokens = LOOLProtocol::tokenize("");
+-    CPPUNIT_ASSERT_EQUAL(0UL, tokens.size());
++    CPPUNIT_ASSERT_EQUAL(0UL, (unsigned long)tokens.size());
+ 
+     tokens = LOOLProtocol::tokenize("  ");
+-    CPPUNIT_ASSERT_EQUAL(0UL, tokens.size());
++    CPPUNIT_ASSERT_EQUAL(0UL, (unsigned long)tokens.size());
+ 
+     tokens = LOOLProtocol::tokenize("A");
+-    CPPUNIT_ASSERT_EQUAL(1UL, tokens.size());
++    CPPUNIT_ASSERT_EQUAL(1UL, (unsigned long)tokens.size());
+     CPPUNIT_ASSERT_EQUAL(std::string("A"), tokens[0]);
+ 
+     tokens = LOOLProtocol::tokenize("  A");
+-    CPPUNIT_ASSERT_EQUAL(1UL, tokens.size());
++    CPPUNIT_ASSERT_EQUAL(1UL, (unsigned long)tokens.size());
+     CPPUNIT_ASSERT_EQUAL(std::string("A"), tokens[0]);
+ 
+     tokens = LOOLProtocol::tokenize("A  ");
+-    CPPUNIT_ASSERT_EQUAL(1UL, tokens.size());
++    CPPUNIT_ASSERT_EQUAL(1UL, (unsigned long)tokens.size());
+     CPPUNIT_ASSERT_EQUAL(std::string("A"), tokens[0]);
+ 
+     tokens = LOOLProtocol::tokenize(" A ");
+-    CPPUNIT_ASSERT_EQUAL(1UL, tokens.size());
++    CPPUNIT_ASSERT_EQUAL(1UL, (unsigned long)tokens.size());
+     CPPUNIT_ASSERT_EQUAL(std::string("A"), tokens[0]);
+ 
+     tokens = LOOLProtocol::tokenize(" A  Z ");
+-    CPPUNIT_ASSERT_EQUAL(2UL, tokens.size());
++    CPPUNIT_ASSERT_EQUAL(2UL, (unsigned long)tokens.size());
+     CPPUNIT_ASSERT_EQUAL(std::string("A"), tokens[0]);
+     CPPUNIT_ASSERT_EQUAL(std::string("Z"), tokens[1]);
+ 
+     tokens = LOOLProtocol::tokenize("\n");
+-    CPPUNIT_ASSERT_EQUAL(0UL, tokens.size());
++    CPPUNIT_ASSERT_EQUAL(0UL, (unsigned long)tokens.size());
+ 
+     tokens = LOOLProtocol::tokenize(" A  \nZ ");
+-    CPPUNIT_ASSERT_EQUAL(1UL, tokens.size());
++    CPPUNIT_ASSERT_EQUAL(1UL, (unsigned long)tokens.size());
+     CPPUNIT_ASSERT_EQUAL(std::string("A"), tokens[0]);
+ 
+     tokens = LOOLProtocol::tokenize(" A  Z\n ");
+-    CPPUNIT_ASSERT_EQUAL(2UL, tokens.size());
++    CPPUNIT_ASSERT_EQUAL(2UL, (unsigned long)tokens.size());
+     CPPUNIT_ASSERT_EQUAL(std::string("A"), tokens[0]);
+     CPPUNIT_ASSERT_EQUAL(std::string("Z"), tokens[1]);
+ 
+     tokens = LOOLProtocol::tokenize(" A  Z  \n ");
+-    CPPUNIT_ASSERT_EQUAL(2UL, tokens.size());
++    CPPUNIT_ASSERT_EQUAL(2UL, (unsigned long)tokens.size());
+     CPPUNIT_ASSERT_EQUAL(std::string("A"), tokens[0]);
+     CPPUNIT_ASSERT_EQUAL(std::string("Z"), tokens[1]);
+ 
+     tokens = LOOLProtocol::tokenize("tile part=0 width=256 height=256 tileposx=0 tileposy=0 tilewidth=3840 tileheight=3840 ver=-1");
+-    CPPUNIT_ASSERT_EQUAL(9UL, tokens.size());
++    CPPUNIT_ASSERT_EQUAL(9UL, (unsigned long)tokens.size());
+     CPPUNIT_ASSERT_EQUAL(std::string("tile"), tokens[0]);
+     CPPUNIT_ASSERT_EQUAL(std::string("part=0"), tokens[1]);
+     CPPUNIT_ASSERT_EQUAL(std::string("width=256"), tokens[2]);
+diff -wbBur online-2.1.1/wsd/Admin.cpp online-2.1.1.q/wsd/Admin.cpp
+--- online-2.1.1/wsd/Admin.cpp	2017-05-18 22:03:26.000000000 +0300
++++ online-2.1.1.q/wsd/Admin.cpp	2017-05-29 18:06:37.882531636 +0300
+@@ -326,7 +326,7 @@
+         if (memWait <= 0)
+         {
+             const auto totalMem = getTotalMemoryUsage();
+-            if (totalMem != _lastTotalMemory)
++            if ((long)totalMem != _lastTotalMemory)
+             {
+                 LOG_TRC("Total memory used: " << totalMem);
+                 _lastTotalMemory = totalMem;
+diff -wbBur online-2.1.1/wsd/Storage.cpp online-2.1.1.q/wsd/Storage.cpp
+--- online-2.1.1/wsd/Storage.cpp	2017-05-18 22:03:26.000000000 +0300
++++ online-2.1.1.q/wsd/Storage.cpp	2017-05-29 18:19:20.949189530 +0300
+@@ -224,7 +224,7 @@
+     const auto lastModified = file.getLastModified();
+     const auto size = file.getSize();
+ 
+-    _fileInfo = FileInfo({filename, "localhost", lastModified, size});
++    _fileInfo = FileInfo({filename, "localhost", lastModified, (size_t)size});
+ 
+     // Set automatic userid and username
+     return std::unique_ptr<LocalStorage::LocalFileInfo>(new LocalFileInfo({"localhost", std::string("Local Host #") + std::to_string(LastLocalStorageId++)}));
+diff -wbBur online-2.1.1/wsd/TraceFile.hpp online-2.1.1.q/wsd/TraceFile.hpp
+--- online-2.1.1/wsd/TraceFile.hpp	2017-05-18 22:03:26.000000000 +0300
++++ online-2.1.1.q/wsd/TraceFile.hpp	2017-05-29 18:13:52.345859974 +0300
+@@ -406,7 +406,7 @@
+             _records[0].Dir != TraceFileRecord::Direction::Event ||
+             _records[0].Payload.find("NewSession") != 0)
+         {
+-            fprintf(stderr, "Invalid trace file with %ld records. First record: %s\n", _records.size(),
++            fprintf(stderr, "Invalid trace file with %ld records. First record: %s\n", (long)_records.size(),
+                     _records.empty() ? "<empty>" : _records[0].Payload.c_str());
+             throw std::runtime_error("Invalid trace file.");
+         }



More information about the arch-commits mailing list