From 5097d1cabc806ee99b068b678982e215950c4f11 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 13 May 2019 11:27:28 +0200 Subject: [PATCH] configmgr: workaround GCC9 -Werror=sign-compare in static_assert ... which is quite unhelpful; any cast would have to make assumptions about the size of types anyway... Change-Id: I5f35d82eb35d1af36b5a572166cf863babf23d41 Reviewed-on: https://gerrit.libreoffice.org/72223 Tested-by: Jenkins Reviewed-by: Michael Stahl --- configmgr/source/dconf.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/configmgr/source/dconf.cxx b/configmgr/source/dconf.cxx index c2b8c2cd1efc..da351bd917a0 100644 --- a/configmgr/source/dconf.cxx +++ b/configmgr/source/dconf.cxx @@ -1174,7 +1174,7 @@ bool addProperty( css::uno::Sequence seq( value.get>()); static_assert( - std::numeric_limits::max() <= G_MAXSIZE, + sizeof(sal_Int32) <= sizeof(gsize), "G_MAXSIZE too small"); static_assert( sizeof (sal_Int8) == sizeof (guchar), "size mismatch"); @@ -1189,7 +1189,7 @@ bool addProperty( css::uno::Sequence seq( value.get>()); static_assert( - std::numeric_limits::max() <= G_MAXSIZE, + sizeof(sal_Int32) <= sizeof(gsize), "G_MAXSIZE too small"); static_assert(sizeof (sal_Bool) == 1, "size mismatch"); v.reset( @@ -1203,7 +1203,7 @@ bool addProperty( css::uno::Sequence seq( value.get>()); static_assert( - std::numeric_limits::max() <= G_MAXSIZE, + sizeof(sal_Int32) <= sizeof(gsize), "G_MAXSIZE too small"); static_assert( sizeof (sal_Int16) == sizeof (gint16), "size mismatch"); @@ -1219,7 +1219,7 @@ bool addProperty( css::uno::Sequence seq( value.get>()); static_assert( - std::numeric_limits::max() <= G_MAXSIZE, + sizeof(sal_Int32) <= sizeof(gsize), "G_MAXSIZE too small"); static_assert( sizeof (sal_Int32) == sizeof (gint32), "size mismatch"); @@ -1235,7 +1235,7 @@ bool addProperty( css::uno::Sequence seq( value.get>()); static_assert( - std::numeric_limits::max() <= G_MAXSIZE, + sizeof(sal_Int32) <= sizeof(gsize), "G_MAXSIZE too small"); static_assert( sizeof (sal_Int64) == sizeof (gint64), "size mismatch"); @@ -1251,7 +1251,7 @@ bool addProperty( css::uno::Sequence seq( value.get>()); static_assert( - std::numeric_limits::max() <= G_MAXSIZE, + sizeof(sal_Int32) <= sizeof(gsize), "G_MAXSIZE too small"); static_assert( sizeof (double) == sizeof (gdouble), "size mismatch"); @@ -1278,7 +1278,7 @@ bool addProperty( vs.push_back(children.front().get()); } static_assert( - std::numeric_limits::max() <= G_MAXSIZE, + sizeof(sal_Int32) <= sizeof(gsize), "G_MAXSIZE too small"); v.reset( g_variant_new_array( @@ -1293,7 +1293,7 @@ bool addProperty( std::vector vs; for (sal_Int32 i = 0; i != seq.getLength(); ++i) { static_assert( - std::numeric_limits::max() <= G_MAXSIZE, + sizeof(sal_Int32) <= sizeof(gsize), "G_MAXSIZE too small"); static_assert( sizeof (sal_Int8) == sizeof (guchar), "size mismatch"); @@ -1315,7 +1315,7 @@ bool addProperty( return false; } static_assert( - std::numeric_limits::max() <= G_MAXSIZE, + sizeof(sal_Int32) <= sizeof(gsize), "G_MAXSIZE too small"); v.reset( g_variant_new_array(ty.get(), vs.data(), seq.getLength()));