[gnome-online-accounts] oauth2: Silence uninit_use_in_call from Coverity



commit 3fdb059a3ee89a57b629cca373154fddef09cc29
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Sep 16 16:07:43 2014 +0200

    oauth2: Silence uninit_use_in_call from Coverity
    
    I don't think this can happen in practice, but instead of hand waving
    let's put this theory to the test.
    
    Fixes: https://bugzilla.gnome.org/736749

 src/goabackend/goaoauth2provider.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/goabackend/goaoauth2provider.c b/src/goabackend/goaoauth2provider.c
index a2cd347..8be7020 100644
--- a/src/goabackend/goaoauth2provider.c
+++ b/src/goabackend/goaoauth2provider.c
@@ -857,7 +857,7 @@ on_web_view_navigation_policy_decision_requested (WebKitWebView             *web
   const gchar *query;
   const gchar *redirect_uri;
   const gchar *requested_uri;
-  gint response_id;
+  gint response_id = GTK_RESPONSE_NONE;
 
   /* TODO: use oauth2_proxy_extract_access_token() */
 
@@ -963,6 +963,7 @@ on_web_view_navigation_policy_decision_requested (WebKitWebView             *web
   goto ignore_request;
 
  ignore_request:
+  g_assert (response_id != GTK_RESPONSE_NONE);
   gtk_dialog_response (priv->dialog, response_id);
   webkit_web_policy_decision_ignore (policy_decision);
   return TRUE;


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