NetworkManager/shared
Thomas Haller 1e4cfba6dc
shared: add a compat implementation for g_atomic_pointer_get()
With glib2-2.67.0-1.fc34.x86_64.rpm, clang-11.0.0-2.fc34.x86_64.rpm, we
get a failure for g_atomic_pointer_get():

    ../shared/nm-glib-aux/nm-hash-utils.c:38:9: error: passing 'typeof (*(&global_seed)) *' (aka 'const unsigned char *volatile *') to parameter of type 'const guint8 **' (aka 'const unsigned char **') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
        g = g_atomic_pointer_get(&global_seed);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/glib/gatomic.h:112:38: note: expanded from macro 'g_atomic_pointer_get'
        __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \
                                         ^~~~~~~~~~~~~~~~~
    ../shared/nm-glib-aux/nm-hash-utils.c:109:32: error: passing 'typeof (*(&global_seed)) *' (aka 'const unsigned char *volatile *') to parameter of type 'const guint8 **' (aka 'const unsigned char **') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
        return ((*((const guint *) _get_hash_key())) ^ static_seed) ?: 3679500967u;
                                   ^~~~~~~~~~~~~~~
    ../shared/nm-glib-aux/nm-hash-utils.c:84:14: note: expanded from macro '_get_hash_key'
            _g = g_atomic_pointer_get(&global_seed); \
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/glib/gatomic.h:112:38: note: expanded from macro 'g_atomic_pointer_get'
        __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \
                                         ^~~~~~~~~~~~~~~~~
    ../shared/nm-glib-aux/nm-hash-utils.c:123:9: error: passing 'typeof (*(&global_seed)) *' (aka 'const unsigned char *volatile *') to parameter of type 'const guint8 **' (aka 'const unsigned char **') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
        g = _get_hash_key();
            ^~~~~~~~~~~~~~~
    ../shared/nm-glib-aux/nm-hash-utils.c:84:14: note: expanded from macro '_get_hash_key'
            _g = g_atomic_pointer_get(&global_seed); \
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/glib/gatomic.h:112:38: note: expanded from macro 'g_atomic_pointer_get'
        __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \
                                         ^~~~~~~~~~~~~~~~~

(cherry picked from commit 5e57ea37f0)
2020-11-23 15:26:47 +01:00
..
c-list shared/c-list: reimport 2020-06-03 22:00:56 +02:00
c-rbtree c-rbtree: align CRBTree with CRBNode 2020-10-21 10:41:15 +02:00
c-siphash all: fix minor typos 2020-07-07 11:33:46 +02:00
c-stdaux all: fix minor typos 2020-07-07 11:33:46 +02:00
n-acd all: fix minor typos 2020-07-07 11:33:46 +02:00
n-dhcp4 n-dhcp4: add n_dhcp4_client_lease_get_server_identifier() 2020-08-26 17:08:15 +02:00
nm-glib-aux shared: add a compat implementation for g_atomic_pointer_get() 2020-11-23 15:26:47 +01:00
nm-std-aux shared: add typedefs for integers for different endianness 2020-09-30 09:49:20 +02:00
nm-udev-aux all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-utils shared/tests: add nmtst_main_context_iterate_until_full() helper 2020-11-23 15:26:46 +01:00
systemd systemd: basic/missing_syscall: fix syscall numbers for mips* 2020-10-08 10:37:25 +02:00
meson.build shared: merge nm-glib-aux/nm-json.[hc] into nm-json-aux.[hc] 2020-07-09 11:47:06 +02:00
nm-default.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-meta-setting.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-meta-setting.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-test-libnm-utils.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-test-utils-impl.c tests: avoid race condition in nmtstc_service_cleanup() 2020-11-23 15:26:46 +01:00
nm-version-macros.h.in version: add 1.28 macros 2020-06-30 11:29:04 +02:00