cleanup
[platform/upstream/glib.git] / gio / gsettingsschema.c
index 85478c8..85cad60 100644 (file)
@@ -251,8 +251,7 @@ g_settings_schema_source_unref (GSettingsSchemaSource *source)
  * may be useful to authors of plugin management systems.
  *
  * The directory should contain a file called `gschemas.compiled` as
- * produced by the
- * <link linkend="glib-compile-schemas">glib-compile-schemas</link> tool.
+ * produced by the [glib-compile-schemas][glib-compile-schemas] tool.
  *
  * If @trusted is %TRUE then `gschemas.compiled` is trusted not to be
  * corrupted. This assumption has a performance advantage, but can result
@@ -395,7 +394,7 @@ g_settings_schema_source_get_default (void)
  *
  * If the schema isn't found, %NULL is returned.
  *
- * Returns: (transfer full): a new #GSettingsSchema
+ * Returns: (nullable) (transfer full): a new #GSettingsSchema
  *
  * Since: 2.32
  **/
@@ -674,8 +673,9 @@ parse_into_text_tables (const gchar *directory,
           GMarkupParseContext *context;
 
           context = g_markup_parse_context_new (&parser, G_MARKUP_TREAT_CDATA_AS_TEXT, &info, NULL);
+          /* Ignore errors here, this is best effort only. */
           if (g_markup_parse_context_parse (context, contents, size, NULL))
-            g_markup_parse_context_end_parse (context, NULL);
+            (void) g_markup_parse_context_end_parse (context, NULL);
           g_markup_parse_context_free (context);
 
           /* Clean up dangling stuff in case there was an error. */
@@ -698,6 +698,8 @@ parse_into_text_tables (const gchar *directory,
 
       g_free (filename);
     }
+  
+  g_dir_close (dir);
 }
 
 static GHashTable **
@@ -724,9 +726,10 @@ g_settings_schema_source_get_text_tables (GSettingsSchemaSource *source)
  * g_settings_schema_source_list_schemas:
  * @source: a #GSettingsSchemaSource
  * @recursive: if we should recurse
- * @non_relocatable: (out) (transfer full): the list of non-relocatable
- *   schemas
- * @relocatable: (out) (transfer full): the list of relocatable schemas
+ * @non_relocatable: (out) (transfer full) (array zero-terminated=1): the
+ *   list of non-relocatable schemas
+ * @relocatable: (out) (transfer full) (array zero-terminated=1): the list
+ *   of relocatable schemas
  *
  * Lists the schemas in a given source.
  *
@@ -1289,7 +1292,7 @@ g_settings_schema_key_get_translated_default (GSettingsSchemaKey *key)
   if (value == NULL)
     {
       g_warning ("Failed to parse translated string '%s' for "
-                 "key '%s' in schema '%s': %s", key->unparsed, key->name,
+                 "key '%s' in schema '%s': %s", translated, key->name,
                  g_settings_schema_get_id (key->schema), error->message);
       g_warning ("Using untranslated default instead.");
       g_error_free (error);