From e5c2d333183c8734cb27acd21817a70f19469925 Mon Sep 17 00:00:00 2001 From: Stefan Becker Date: Sat, 1 Dec 2012 19:48:53 +0200 Subject: [PATCH] telepathy: fix two Coverity warnings --- src/telepathy/telepathy-buddy.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/telepathy/telepathy-buddy.c b/src/telepathy/telepathy-buddy.c index 9e00edfd..de2ef178 100644 --- a/src/telepathy/telepathy-buddy.c +++ b/src/telepathy/telepathy-buddy.c @@ -590,9 +590,10 @@ sipe_backend_buddy sipe_backend_buddy_find(struct sipe_core_public *sipe_public, } else { /* just return the first entry */ GHashTableIter iter; - gpointer value; + gpointer value = NULL; g_hash_table_iter_init(&iter, buddy->groups); - g_hash_table_iter_next(&iter, NULL, &value); + /* make Coverity happy: as buddy != NULL this can't fail */ + (void) g_hash_table_iter_next(&iter, NULL, &value); return(value); } } @@ -941,7 +942,7 @@ void sipe_backend_buddy_set_photo(struct sipe_core_public *sipe_public, char *photo_file = g_build_filename(telepathy_private->cache_dir, buddy->hash, NULL); - g_remove(photo_file); + (void) g_remove(photo_file); g_free(photo_file); g_free(buddy->hash); buddy->hash = NULL; -- 2.11.4.GIT