[gnome-keyring/wip/nielsdg/fix-warnings: 7/7] pkcs11: Fix some type mismatch warnings
- From: Daiki Ueno <dueno src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring/wip/nielsdg/fix-warnings: 7/7] pkcs11: Fix some type mismatch warnings
- Date: Tue, 14 Jan 2020 14:45:46 +0000 (UTC)
commit 5b4516f70f71ab6a73dce54647814f25bed3e3b1
Author: Niels De Graef <nielsdegraef gmail com>
Date: Fri Jan 3 00:09:37 2020 +0100
pkcs11: Fix some type mismatch warnings
Provide the necessary casts when using `g_object_ref` and a subclass of
the return type. Fixes some warnings.
pkcs11/secret-store/gkm-secret-collection.c | 2 +-
pkcs11/secret-store/gkm-secret-item.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/pkcs11/secret-store/gkm-secret-collection.c b/pkcs11/secret-store/gkm-secret-collection.c
index 6df56b2f..f6981bb1 100644
--- a/pkcs11/secret-store/gkm-secret-collection.c
+++ b/pkcs11/secret-store/gkm-secret-collection.c
@@ -291,7 +291,7 @@ factory_create_collection (GkmSession *session, GkmTransaction *transaction,
if (collection != NULL) {
gkm_session_complete_object_creation (session, transaction, GKM_OBJECT (collection),
FALSE, attrs, n_attrs);
- return g_object_ref (collection);
+ return GKM_OBJECT (g_object_ref (collection));
}
}
diff --git a/pkcs11/secret-store/gkm-secret-item.c b/pkcs11/secret-store/gkm-secret-item.c
index fc210bc2..77535816 100644
--- a/pkcs11/secret-store/gkm-secret-item.c
+++ b/pkcs11/secret-store/gkm-secret-item.c
@@ -173,7 +173,7 @@ factory_create_item (GkmSession *session, GkmTransaction *transaction,
} else {
gkm_session_complete_object_creation (session, transaction, GKM_OBJECT (item),
FALSE, attrs, n_attrs);
- return g_object_ref (item);
+ return GKM_OBJECT (g_object_ref (item));
}
}
@@ -181,7 +181,7 @@ factory_create_item (GkmSession *session, GkmTransaction *transaction,
item = gkm_secret_collection_create_item (collection, transaction);
gkm_session_complete_object_creation (session, transaction, GKM_OBJECT (item),
TRUE, attrs, n_attrs);
- return g_object_ref (item);
+ return GKM_OBJECT (g_object_ref (item));
}
/* -----------------------------------------------------------------------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]