[gnome-keyring/wip/nielsdg/fix-warnings: 3/3] pkcs11: Fix some type mismatch warnings
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring/wip/nielsdg/fix-warnings: 3/3] pkcs11: Fix some type mismatch warnings
- Date: Thu, 2 Jan 2020 23:12:01 +0000 (UTC)
commit d3c75f2029be72a4c5115f1aa9b2c42dd0026d65
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]