Silence a bunch of -Wunused-but-set-variable warnings
[platform/upstream/glib.git] / gio / gdbusaddress.c
index 83e7699..1f2645e 100644 (file)
@@ -258,6 +258,25 @@ is_valid_nonce_tcp (const gchar  *address_entry,
       goto out;
     }
 
+  if (nonce_file == NULL)
+    {
+      g_set_error (error,
+                   G_IO_ERROR,
+                   G_IO_ERROR_INVALID_ARGUMENT,
+                   _("Error in address `%s' - missing noncefile attribute"),
+                   address_entry);
+      goto out;
+    }
+  if (host == NULL)
+    {
+      g_set_error (error,
+                   G_IO_ERROR,
+                   G_IO_ERROR_INVALID_ARGUMENT,
+                   _("Error in address `%s' - missing host attribute"),
+                   address_entry);
+      goto out;
+    }
+
   ret= TRUE;
 
  out:
@@ -332,6 +351,16 @@ is_valid_tcp (const gchar  *address_entry,
       goto out;
     }
 
+  if (host == NULL)
+    {
+      g_set_error (error,
+                   G_IO_ERROR,
+                   G_IO_ERROR_INVALID_ARGUMENT,
+                   _("Error in address `%s' - missing host attribute"),
+                   address_entry);
+      goto out;
+    }
+
   ret= TRUE;
 
  out: