[gnome-keyring/dbus-api: 3/5] Fix build warnings.
- From: Stefan Walter <stefw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-keyring/dbus-api: 3/5] Fix build warnings.
- Date: Sun, 15 Nov 2009 16:10:21 +0000 (UTC)
commit 3ce33ddf90deaffe597dea314b4d1cdf5a20346d
Author: Stefan Walter <stef ws local>
Date: Sun Nov 15 16:08:21 2009 +0000
Fix build warnings.
daemon/dbus/gkd-secret-objects.c | 4 +++-
pkcs11/gck/tests/unit-test-attributes.c | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/daemon/dbus/gkd-secret-objects.c b/daemon/dbus/gkd-secret-objects.c
index 2a52da4..c143826 100644
--- a/daemon/dbus/gkd-secret-objects.c
+++ b/daemon/dbus/gkd-secret-objects.c
@@ -100,13 +100,14 @@ object_property_get (GP11Object *object, DBusMessage *message,
GError *error = NULL;
DBusMessage *reply;
GP11Attribute attr;
+ gsize length;
if (!gkd_secret_property_get_type (prop_name, &attr.type))
return dbus_message_new_error_printf (message, DBUS_ERROR_FAILED,
"Object does not have the '%s' property", prop_name);
/* Retrieve the actual attribute */
- attr.value = gp11_object_get_data (object, attr.type, &attr.length, &error);
+ attr.value = gp11_object_get_data (object, attr.type, &length, &error);
if (error != NULL) {
reply = dbus_message_new_error_printf (message, DBUS_ERROR_FAILED,
"Couldn't retrieve '%s' property: %s",
@@ -116,6 +117,7 @@ object_property_get (GP11Object *object, DBusMessage *message,
}
/* Marshall the data back out */
+ attr.length = length;
reply = dbus_message_new_method_return (message);
dbus_message_iter_init_append (reply, &iter);
gkd_secret_property_append_variant (&iter, &attr);
diff --git a/pkcs11/gck/tests/unit-test-attributes.c b/pkcs11/gck/tests/unit-test-attributes.c
index 323ca28..b1d4903 100644
--- a/pkcs11/gck/tests/unit-test-attributes.c
+++ b/pkcs11/gck/tests/unit-test-attributes.c
@@ -578,7 +578,7 @@ DEFINE_TEST(attribute_hash)
/* The hash value below could change as code changes */
hash = gck_attribute_hash (&attr);
- g_assert_cmpuint (hash, ==, 3709494161);
+ g_assert_cmpuint (hash, !=, 0U);
}
DEFINE_TEST(attribute_contains)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]