diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-11-07 08:55:41 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-11-07 08:55:41 +0100 |
commit | 2bea600f0295cab7fad3edb55f0c5e092640e49e (patch) | |
tree | fc4a8396daf8dccb3c60284d8301102ec08d505b /external | |
parent | ca34d38983303d7649fc2d5804d3414fe47a4689 (diff) |
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
Diffstat (limited to 'external')
-rw-r--r-- | external/lcms2/UnpackedTarball_lcms2.mk | 1 | ||||
-rw-r--r-- | external/lcms2/c++17.patch.0 | 22 |
2 files changed, 23 insertions, 0 deletions
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 |