vcl/unx/gtk3/customcellrenderer.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 40bb18802eb7ccdb60cbf9a68f6228f769468410
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Thu Aug 3 08:51:40 2023 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Thu Aug 3 12:55:08 2023 +0200

    Silence another C++20 -Wdeprecated-volatile with old GLib
    
    ...that hit with patch set 3 of
    <https://gerrit.libreoffice.org/c/core/+/155121/3> "Bump baseline to C++20",
    
    > 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/vcl/unx/gtk3/customcellrenderer.cxx:29:1:
 error: use of result of assignment to object of volatile-qualified type 
'volatile gsize' (aka 'volatile unsigned long') is deprecated 
[-Werror,-Wdeprecated-volatile]
    > G_DEFINE_TYPE(CustomCellRenderer, custom_cell_renderer, 
GTK_TYPE_CELL_RENDERER_TEXT)
    > ^
    > /usr/include/glib-2.0/gobject/gtype.h:1595:43: note: expanded from macro 
'G_DEFINE_TYPE'
    > #define G_DEFINE_TYPE(TN, t_n, T_P)                         
G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
    >                                                             ^
    > /usr/include/glib-2.0/gobject/gtype.h:1737:117: note: expanded from macro 
'G_DEFINE_TYPE_EXTENDED'
    > #define G_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_)      
_G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, _f_) {_C_;} 
_G_DEFINE_TYPE_EXTENDED_END()
    >                                                                           
                                           ^
    > /usr/include/glib-2.0/gobject/gtype.h:1985:7: note: expanded from macro 
'_G_DEFINE_TYPE_EXTENDED_END'
    >       g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \
    >       ^
    > /usr/include/glib-2.0/glib/gthread.h:257:17: note: expanded from macro 
'g_once_init_leave'
    >     (void) (0 ? *(location) = (result) : 0);                         \
    >                 ^
    
    (<https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil/145888/>), but 
which
    is also addressed by upstream
    
<https://gitlab.gnome.org/GNOME/glib/-/commit/fab561f8d05794329184cd81f9ab9d9d77dcc22a>
    "gobject: Drop use of volatile from get_type() macros"
    
    Change-Id: I9f7e45133cb15a71cba838190454a809488142d7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155277
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/vcl/unx/gtk3/customcellrenderer.cxx 
b/vcl/unx/gtk3/customcellrenderer.cxx
index c7c6661ed912..7632c7641538 100644
--- a/vcl/unx/gtk3/customcellrenderer.cxx
+++ b/vcl/unx/gtk3/customcellrenderer.cxx
@@ -26,7 +26,16 @@ enum
 };
 }
 
+#if defined __clang__ && __cplusplus >= 202002L && GLIB_MAJOR_VERSION == 2     
                    \
+    && GLIB_MINOR_VERSION < 68
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-volatile"
+#endif
 G_DEFINE_TYPE(CustomCellRenderer, custom_cell_renderer, 
GTK_TYPE_CELL_RENDERER_TEXT)
+#if defined __clang__ && __cplusplus >= 202002L && GLIB_MAJOR_VERSION == 2     
                    \
+    && GLIB_MINOR_VERSION < 68
+#pragma clang diagnostic pop
+#endif
 
 static void custom_cell_renderer_init(CustomCellRenderer* self)
 {

Reply via email to