NetworkManager/shared/nm-glib-aux
Thomas Haller 9654d6fa61
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)
(cherry picked from commit 1e4cfba6dc)
(cherry picked from commit 446cac18cc)
(cherry picked from commit af4d01b51b)
(cherry picked from commit 17c83d09eb)
2021-06-10 19:32:52 +02:00
..
nm-c-list.h shared: add nm_c_list_elem_free_steal() util 2019-07-02 17:52:53 +02:00
nm-dbus-aux.c shared: add nm_dbus_connection_signal_subscribe_name_owner_changed() helper 2019-05-12 09:56:36 +02:00
nm-dbus-aux.h shared: add nm_dbus_connection_call_start_service_by_name() helper 2019-05-12 09:56:36 +02:00
nm-dedup-multi.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-dedup-multi.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-enum-utils.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-enum-utils.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-errno.c shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-errno.h shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-glib.h shared: add a compat implementation for g_atomic_pointer_get() 2021-06-10 19:32:52 +02:00
nm-hash-utils.c shared: add nm_pdirect_hash()/nm_pdirect_equal() 2019-07-10 12:43:06 +02:00
nm-hash-utils.h shared: add NM_HASH_SEED_16() macro 2019-07-31 10:44:37 +02:00
nm-io-utils.c shared: add nm_utils_file_stat() util 2019-06-26 09:53:54 +02:00
nm-io-utils.h shared: add nm_utils_file_stat() util 2019-06-26 09:53:54 +02:00
nm-jansson.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-json-aux.c shared: add nm_json_aux_gstr_append_*() helper 2019-05-23 18:09:49 +02:00
nm-json-aux.h shared: add JSON helper functions for NMValueType 2019-05-23 18:09:49 +02:00
nm-keyfile-aux.c shared: fix non-serious bug with bogus condition in assertion in nm_key_file_db_ref() 2019-08-01 17:25:37 +02:00
nm-keyfile-aux.h shared: add NMKeyFileDB API 2019-05-07 16:41:21 +02:00
nm-logging-fwd.h shared: implement _nm_utils_monotonic_timestamp_initialized() in "nm-logging-stub.c" 2019-05-22 20:04:08 +02:00
nm-macros-internal.h initrd: fix memory leak 2020-09-08 14:58:00 +02:00
nm-obj.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-random-utils.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-random-utils.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-secret-utils.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-secret-utils.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-shared-utils.c shared: add nm_utils_buf_utf8safe_escape_cp() helper 2020-09-08 14:58:00 +02:00
nm-shared-utils.h shared: add nm_auto_destroy_and_unref_gsource macro 2021-06-10 19:32:49 +02:00
nm-time-utils.c core: improve code comment and add assertion to nm_utils_monotonic_timestamp_as_boottime() 2019-07-25 15:10:43 +02:00
nm-time-utils.h shared: add nm_utils_clock_gettime_*() util 2019-07-23 12:19:22 +02:00
nm-value-type.h shared: fix return in nm_value_type_to_variant()/nm_value_type_get_variant_type() 2019-05-27 13:27:13 +02:00