[evolution-data-server] Fix variable type to calls of g_once_init_enter()



commit 1c60e41db5d7c170539d700e028368cf7e5b9e27
Author: Milan Crha <mcrha redhat com>
Date:   Fri Jan 8 12:32:25 2021 +0100

    Fix variable type to calls of g_once_init_enter()
    
    The variable should not be declared as 'volatile', compiler claims
    a warning otherwise.

 cmake/modules/GLibTools.cmake                    | 2 +-
 src/addressbook/libebook-contacts/e-book-query.c | 2 +-
 src/addressbook/libebook-contacts/e-contact.c    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/cmake/modules/GLibTools.cmake b/cmake/modules/GLibTools.cmake
index f46ff6c02..39ccf0f29 100644
--- a/cmake/modules/GLibTools.cmake
+++ b/cmake/modules/GLibTools.cmake
@@ -114,7 +114,7 @@ set(SOURCE_TMPL "
 GType
 @enum_name@_get_type (void)
 {
-       static volatile gsize the_type__volatile = 0;
+       static gsize the_type__volatile = 0;
 
        if (g_once_init_enter (&the_type__volatile)) {
                static const G\@Type\@Value values[] = {
diff --git a/src/addressbook/libebook-contacts/e-book-query.c 
b/src/addressbook/libebook-contacts/e-book-query.c
index 52cff1a75..2db08a02a 100644
--- a/src/addressbook/libebook-contacts/e-book-query.c
+++ b/src/addressbook/libebook-contacts/e-book-query.c
@@ -936,7 +936,7 @@ e_book_query_to_string (EBookQuery *q)
 GType
 e_book_query_get_type (void)
 {
-       static volatile gsize type_id__volatile = 0;
+       static gsize type_id__volatile = 0;
 
        if (g_once_init_enter (&type_id__volatile)) {
                GType type_id;
diff --git a/src/addressbook/libebook-contacts/e-contact.c b/src/addressbook/libebook-contacts/e-contact.c
index 92b8822a5..0b3edc5ee 100644
--- a/src/addressbook/libebook-contacts/e-contact.c
+++ b/src/addressbook/libebook-contacts/e-contact.c
@@ -2270,7 +2270,7 @@ e_contact_name_free (EContactName *name)
        GType \
        _tp ## _get_type (void) \
        { \
-               static volatile gsize type_id__volatile = 0; \
+               static gsize type_id__volatile = 0; \
  \
                if (g_once_init_enter (&type_id__volatile)) { \
                        GType type_id; \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]