[Libreoffice-commits] core.git: configmgr/source

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Mon May 13 12:37:29 UTC 2019


 configmgr/source/dconf.cxx |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 5097d1cabc806ee99b068b678982e215950c4f11
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Mon May 13 11:27:28 2019 +0200
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon May 13 14:36:47 2019 +0200

    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 <Michael.Stahl at cib.de>

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<sal_Int8> seq(
                     value.get<css::uno::Sequence<sal_Int8>>());
                 static_assert(
-                    std::numeric_limits<sal_Int32>::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<sal_Bool> seq(
                     value.get<css::uno::Sequence<sal_Bool>>());
                 static_assert(
-                    std::numeric_limits<sal_Int32>::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<sal_Int16> seq(
                     value.get<css::uno::Sequence<sal_Int16>>());
                 static_assert(
-                    std::numeric_limits<sal_Int32>::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<sal_Int32> seq(
                     value.get<css::uno::Sequence<sal_Int32>>());
                 static_assert(
-                    std::numeric_limits<sal_Int32>::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<sal_Int64> seq(
                     value.get<css::uno::Sequence<sal_Int64>>());
                 static_assert(
-                    std::numeric_limits<sal_Int32>::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<double> seq(
                     value.get<css::uno::Sequence<double>>());
                 static_assert(
-                    std::numeric_limits<sal_Int32>::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<sal_Int32>::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<GVariant *> vs;
                 for (sal_Int32 i = 0; i != seq.getLength(); ++i) {
                     static_assert(
-                        std::numeric_limits<sal_Int32>::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<sal_Int32>::max() <= G_MAXSIZE,
+                    sizeof(sal_Int32) <= sizeof(gsize),
                     "G_MAXSIZE too small");
                 v.reset(
                     g_variant_new_array(ty.get(), vs.data(), seq.getLength()));


More information about the Libreoffice-commits mailing list