[gnome-online-accounts] Avoid a few compiler warnings



commit 749166a6a5495154e1a4b63b6db37c504d868b85
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Dec 1 10:41:41 2013 -0500

    Avoid a few compiler warnings
    
    There were a few cases of g_return_if_fail / g_return_val_if_fail
    confusion in goa, and build.gnome.org makes the resulting compiler
    warnings visible now, so clean that up.

 src/goabackend/goaproviderfactory.c  |    4 ++--
 src/goabackend/goatelepathyfactory.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/goabackend/goaproviderfactory.c b/src/goabackend/goaproviderfactory.c
index df1cb09..ff41657 100644
--- a/src/goabackend/goaproviderfactory.c
+++ b/src/goabackend/goaproviderfactory.c
@@ -116,7 +116,7 @@ goa_provider_factory_get_providers_finish (GoaProviderFactory  *factory,
 {
   GoaProviderFactoryClass *klass;
 
-  g_return_if_fail (GOA_IS_PROVIDER_FACTORY (factory));
+  g_return_val_if_fail (GOA_IS_PROVIDER_FACTORY (factory), FALSE);
 
   klass = GOA_PROVIDER_FACTORY_GET_CLASS (factory);
   return klass->get_providers_finish (factory, out_providers, result, error);
@@ -133,7 +133,7 @@ get_providers_finish_default (GoaProviderFactory  *factory,
   GList *providers;
 
   g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (factory), NULL),
-      NULL);
+      FALSE);
 
   if (g_simple_async_result_propagate_error (simple, error))
     return FALSE;
diff --git a/src/goabackend/goatelepathyfactory.c b/src/goabackend/goatelepathyfactory.c
index 097b984..82c7699 100644
--- a/src/goabackend/goatelepathyfactory.c
+++ b/src/goabackend/goatelepathyfactory.c
@@ -53,7 +53,7 @@ static GoaProvider *
 get_provider (GoaProviderFactory *factory,
               const gchar        *provider_name)
 {
-  g_return_if_fail (GOA_IS_TELEPATHY_FACTORY (factory));
+  g_return_val_if_fail (GOA_IS_TELEPATHY_FACTORY (factory), NULL);
 
   return GOA_PROVIDER (goa_telepathy_provider_new_from_protocol_name (provider_name));
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]