[epiphany/mcatanzaro/cppcheck: 7/11] web-view: fix cppcheck warnings



commit a855734dc6874dbe1e66029da411e58f88d7f434
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun Nov 17 09:27:46 2019 -0600

    web-view: fix cppcheck warnings
    
    It found some unused instance member variables, and an extra break. Also
    there is a false-positive warning about an uninitialized return value,
    which is wrong because we always initialize it, but this is easy to
    suppress and it's safer to initialize sooner rather than later anyway.

 embed/ephy-web-view.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 7c4553028..716c7a687 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -101,10 +101,6 @@ struct _EphyWebView {
   /* Local file watch. */
   EphyFileMonitor *file_monitor;
 
-  /* Regex to figure out if we're dealing with a wanna-be URI */
-  GRegex *non_search_regex;
-  GRegex *domain_regex;
-
   GSList *hidden_popups;
   GSList *shown_popups;
 
@@ -123,8 +119,6 @@ struct _EphyWebView {
 
   EphyHistoryPageVisitType visit_type;
 
-  gulong do_not_track_handler;
-
   /* TLS information. */
   GTlsCertificate *certificate;
   GTlsCertificateFlags tls_errors;
@@ -507,7 +501,6 @@ ephy_web_view_set_property (GObject      *object,
     case PROP_TYPED_ADDRESS:
       ephy_web_view_set_typed_address (EPHY_WEB_VIEW (object), g_value_get_string (value));
       break;
-      break;
     case PROP_ADDRESS:
     case PROP_DOCUMENT_TYPE:
     case PROP_HIDDEN_POPUP_COUNT:
@@ -2145,7 +2138,7 @@ static char *
 detailed_message_from_tls_errors (GTlsCertificateFlags tls_errors)
 {
   GPtrArray *errors = g_ptr_array_new ();
-  char *retval;
+  char *retval = NULL;
 
   if (tls_errors & G_TLS_CERTIFICATE_BAD_IDENTITY) {
     /* Possible error message when a site presents a bad certificate. */


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