[Libreoffice-commits] core.git: external/lcms2

Stephan Bergmann sbergman at redhat.com
Tue Nov 7 08:03:05 UTC 2017


 external/lcms2/UnpackedTarball_lcms2.mk |    1 +
 external/lcms2/c++17.patch.0            |   22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+)

New commits:
commit 2bea600f0295cab7fad3edb55f0c5e092640e49e
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Nov 7 08:55:41 2017 +0100

    external/lcms2: Stop warnings/errors about "register"
    
    ...when workdir/UnpackedTarball/lcms2/include/lcms2.h is included from
    workdir/UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_colorspace.cpp
    (Library_pdfium).  Even with -std=gnu++17, GCC only emits a warning (that is not
    promoted to an error when building external Library_pdfium) about "register",
    but at least recent trunk Clang does emit an error by default.  (Clang used to
    have a bug by which it failed to emit any warning/error for uses of "register"
    on function parameters, but that got recently fixed with
    <http://llvm.org/viewvc/llvm-project?view=revision&revision=317140> "Fix missing
    -Wregister warning when 'register' is applied to a function parameter", causing
    an --enable-werror build failure now when building in C++17 mode with
    <https://gerrit.libreoffice.org/#/c/43851/> "Build as C++17 when GCC/Clang
    supports it" locally included.)
    
    So instead of trying to further demote any warnings/errors about those uses of
    "register", just patch them away for good.
    
    Change-Id: I7c8757e654d87be710eaaafa871300656d9ee8ff

diff --git a/external/lcms2/UnpackedTarball_lcms2.mk b/external/lcms2/UnpackedTarball_lcms2.mk
index 3d9bf8e89666..01d04802c739 100644
--- a/external/lcms2/UnpackedTarball_lcms2.mk
+++ b/external/lcms2/UnpackedTarball_lcms2.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,lcms2,\
 	external/lcms2/lcms2-2.4-windows.patch \
 	external/lcms2/lcms2-msvc-disable-sse2.patch.1 \
 	external/lcms2/0001-Added-an-extra-check-to-MLU-bounds.patch.1 \
+	external/lcms2/c++17.patch.0 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/lcms2/c++17.patch.0 b/external/lcms2/c++17.patch.0
new file mode 100644
index 000000000000..9a9de3f04c83
--- /dev/null
+++ b/external/lcms2/c++17.patch.0
@@ -0,0 +1,22 @@
+--- include/lcms2.h
++++ include/lcms2.h
+@@ -1248,13 +1248,13 @@
+ CMSAPI void*             CMSEXPORT cmsStageData(const cmsStage* mpe);
+ 
+ // Sampling
+-typedef cmsInt32Number (* cmsSAMPLER16)   (register const cmsUInt16Number In[],
+-                                            register cmsUInt16Number Out[],
+-                                            register void * Cargo);
++typedef cmsInt32Number (* cmsSAMPLER16)   (const cmsUInt16Number In[],
++                                            cmsUInt16Number Out[],
++                                            void * Cargo);
+ 
+-typedef cmsInt32Number (* cmsSAMPLERFLOAT)(register const cmsFloat32Number In[],
+-                                            register cmsFloat32Number Out[],
+-                                            register void * Cargo);
++typedef cmsInt32Number (* cmsSAMPLERFLOAT)(const cmsFloat32Number In[],
++                                            cmsFloat32Number Out[],
++                                            void * Cargo);
+ 
+ // Use this flag to prevent changes being written to destination
+ #define SAMPLER_INSPECT     0x01000000


More information about the Libreoffice-commits mailing list