mirror of
https://gitlab.gnome.org/GNOME/libsecret.git
synced 2024-12-22 04:38:55 +00:00
Fix issues flagged by static analyzers
These changes specifically fix the issues flagged by clang-analyzer. Fixes: #59
This commit is contained in:
parent
127f326a2d
commit
7e713cf65a
@ -1560,8 +1560,6 @@ secret_collection_search_sync (SecretCollection *self,
|
||||
if (paths == NULL)
|
||||
return NULL;
|
||||
|
||||
ret = TRUE;
|
||||
|
||||
want = 1;
|
||||
if (flags & SECRET_SEARCH_ALL)
|
||||
want = G_MAXINT;
|
||||
|
@ -1140,9 +1140,6 @@ secret_service_open (GType service_gtype,
|
||||
g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
|
||||
g_return_if_fail (g_type_is_a (service_gtype, SECRET_TYPE_SERVICE));
|
||||
|
||||
if (service_bus_name == NULL)
|
||||
service_bus_name = get_default_bus_name ();
|
||||
|
||||
g_async_initable_new_async (service_gtype, G_PRIORITY_DEFAULT,
|
||||
cancellable, callback, user_data,
|
||||
"flags", flags,
|
||||
@ -1217,9 +1214,6 @@ secret_service_open_sync (GType service_gtype,
|
||||
g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
|
||||
g_return_val_if_fail (g_type_is_a (service_gtype, SECRET_TYPE_SERVICE), NULL);
|
||||
|
||||
if (service_bus_name == NULL)
|
||||
service_bus_name = get_default_bus_name ();
|
||||
|
||||
return g_initable_new (service_gtype, cancellable, error,
|
||||
"flags", flags,
|
||||
NULL);
|
||||
|
@ -727,6 +727,7 @@ test_store_sync (Test *test,
|
||||
|
||||
ret = secret_service_store_sync (test->service, &MOCK_SCHEMA, attributes, collection_path,
|
||||
"New Item Label", value, NULL, &error);
|
||||
g_assert_true (ret);
|
||||
g_assert_no_error (error);
|
||||
secret_value_unref (value);
|
||||
g_hash_table_unref (attributes);
|
||||
@ -776,10 +777,12 @@ test_store_replace (Test *test,
|
||||
|
||||
ret = secret_service_store_sync (test->service, &MOCK_SCHEMA, attributes, collection_path,
|
||||
"New Item Label", value, NULL, &error);
|
||||
g_assert_true (ret);
|
||||
g_assert_no_error (error);
|
||||
|
||||
ret = secret_service_store_sync (test->service, &MOCK_SCHEMA, attributes, collection_path,
|
||||
"Another Label", value, NULL, &error);
|
||||
g_assert_true (ret);
|
||||
g_assert_no_error (error);
|
||||
secret_value_unref (value);
|
||||
g_hash_table_unref (attributes);
|
||||
@ -829,6 +832,7 @@ test_store_async (Test *test,
|
||||
egg_test_wait ();
|
||||
|
||||
ret = secret_service_store_finish (test->service, result, &error);
|
||||
g_assert_true (ret);
|
||||
g_assert_no_error (error);
|
||||
g_object_unref (result);
|
||||
|
||||
@ -877,6 +881,7 @@ test_store_no_default (Test *test,
|
||||
|
||||
ret = secret_service_store_sync (test->service, &MOCK_SCHEMA, attributes, SECRET_COLLECTION_DEFAULT,
|
||||
"New Item Label", value, NULL, &error);
|
||||
g_assert_true (ret);
|
||||
g_assert_no_error (error);
|
||||
secret_value_unref (value);
|
||||
g_hash_table_unref (attributes);
|
||||
|
Loading…
Reference in New Issue
Block a user