[Libreoffice-commits] .: libcmis/StaticLibrary_cmis.mk

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Sep 17 04:32:27 PDT 2012


 libcmis/StaticLibrary_cmis.mk |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 1e5e5c4022d582e2bef86425560f5109d41bdd63
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Mon Sep 17 13:29:17 2012 +0200

    avoid C++11 narrowing conversion error with clang
    
    /home/tinderbox/clang-master-build/solver/unxlngi6/inc/external/boost/uuid/seed_rng.hpp:143:61:
    error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned int' in initializer list [-Wc++11-narrowing]
                unsigned int rn[] = { std::rand(), std::rand(), std::rand() };
    
    Change-Id: Iea9808492cd3fbcf078e61bbc184bdc434e7cd8a

diff --git a/libcmis/StaticLibrary_cmis.mk b/libcmis/StaticLibrary_cmis.mk
index 23b600d..1e33865 100644
--- a/libcmis/StaticLibrary_cmis.mk
+++ b/libcmis/StaticLibrary_cmis.mk
@@ -11,6 +11,14 @@ $(eval $(call gb_StaticLibrary_StaticLibrary,cmislib))
 
 $(eval $(call gb_StaticLibrary_set_warnings_not_errors,cmislib))
 
+ifeq ($(COM_GCC_IS_CLANG),TRUE)
+# Avoid narrowing conversion error (even though the option is technically a warning)
+# caused by boost.
+$(eval $(call gb_StaticLibrary_add_cxxflags,cmislib,\
+    -Wno-error=c++11-narrowing \
+))
+endif
+
 $(eval $(call gb_StaticLibrary_use_unpacked,cmislib,cmis))
 
 $(eval $(call gb_StaticLibrary_use_package,cmislib,libcmis_inc))


More information about the Libreoffice-commits mailing list