diff --git a/gtksourceview/gtksourcebindinggroup.c b/gtksourceview/gtksourcebindinggroup.c index 4d1ccda2ed5a4cdf10e10957ff4f1ad18ed1c408..2d4f90b59217c672b4af1957028a1835c02aa019 100644 --- a/gtksourceview/gtksourcebindinggroup.c +++ b/gtksourceview/gtksourcebindinggroup.c @@ -116,7 +116,7 @@ gtk_source_binding_group_connect (GtkSourceBindingGroup *self, #ifdef DEBUG_BINDINGS { GFlagsClass *flags_class; - g_autofree gchar *flags_str = NULL; + gchar *flags_str = NULL; flags_class = g_type_class_ref (G_TYPE_BINDING_FLAGS); flags_str = _g_flags_to_string (flags_class, lazy_binding->binding_flags); @@ -130,6 +130,7 @@ gtk_source_binding_group_connect (GtkSourceBindingGroup *self, lazy_binding->target_property, flags_str); + g_free (flags_str); g_type_class_unref (flags_class); } #endif diff --git a/gtksourceview/gtksourcemap.c b/gtksourceview/gtksourcemap.c index b741d9e5db787c83ca4a6aade2d1e59fc7c340dd..968f2c0f6af7a1496f8624918518e94e4a3c1d1f 100644 --- a/gtksourceview/gtksourcemap.c +++ b/gtksourceview/gtksourcemap.c @@ -1191,7 +1191,7 @@ gtk_source_map_constructed (GObject *object) { G_OBJECT_CLASS (gtk_source_map_parent_class)->constructed (object); -#ifdef ENABLE_FONT_CONFIG +#if ENABLE_FONT_CONFIG load_override_font (GTK_SOURCE_MAP (object)); #endif } diff --git a/gtksourceview/gtksourcescheduler.c b/gtksourceview/gtksourcescheduler.c index c0d2f5edcc0d806136e1ce9e94f8a00b03a0d49e..c2ad5eb7aabafa6e26ea79399522dbb95258441b 100644 --- a/gtksourceview/gtksourcescheduler.c +++ b/gtksourceview/gtksourcescheduler.c @@ -117,11 +117,13 @@ get_interval (GtkSourceScheduler *self) for (guint i = 0; i < n_items; i++) { - g_autoptr(GdkMonitor) monitor = g_list_model_get_item (monitors, i); + GdkMonitor *monitor = g_list_model_get_item (monitors, i); gint64 interval = gdk_monitor_get_refresh_rate (monitor); if (interval != 0 && interval < lowest_interval) lowest_interval = interval; + + g_object_unref (monitor); } self->interval = (double)G_USEC_PER_SEC / (double)lowest_interval * 1000.0; diff --git a/gtksourceview/gtksourcesnippetbundle-parser.c b/gtksourceview/gtksourcesnippetbundle-parser.c index 62c02f7f80b40efecbea23d5f8f6ece1cae5c37c..3f7f6f0781bdbabe3160d46e6f61b07f08e33c96 100644 --- a/gtksourceview/gtksourcesnippetbundle-parser.c +++ b/gtksourceview/gtksourcesnippetbundle-parser.c @@ -20,6 +20,7 @@ #include "config.h" #include +#include #include "gtksourcesnippetbundle-private.h" #include "gtksourcesnippetchunk.h" diff --git a/tests/test-load.c b/tests/test-load.c index 033ec27487521b324ba8c89142f5728ea8146d63..2fe040c213f65958f98f0056472150db8d93ec1b 100644 --- a/tests/test-load.c +++ b/tests/test-load.c @@ -6,12 +6,13 @@ finished_cb (GObject *object, GAsyncResult *result, gpointer user_data) { - g_autoptr(GError) error = NULL; + GError *error = NULL; GMainLoop *loop = user_data; if (!gtk_source_file_loader_load_finish (GTK_SOURCE_FILE_LOADER (object), result, &error)) g_printerr ("Error loading file: %s\n", error->message); + g_clear_error (&error); g_main_loop_quit (loop); } @@ -19,11 +20,11 @@ int main (int argc, char *argv[]) { - g_autoptr(GFile) file = NULL; - g_autoptr(GMainLoop) loop = NULL; - g_autoptr(GtkSourceBuffer) buffer = NULL; - g_autoptr(GtkSourceFile) sfile = NULL; - g_autoptr(GtkSourceFileLoader) loader = NULL; + GFile *file = NULL; + GMainLoop *loop = NULL; + GtkSourceBuffer *buffer = NULL; + GtkSourceFile *sfile = NULL; + GtkSourceFileLoader *loader = NULL; if (argc != 2) { @@ -44,5 +45,10 @@ main (int argc, g_main_loop_run (loop); + g_object_unref (loader); + g_object_unref (sfile); + g_object_unref (buffer); + g_object_unref (file); + g_main_loop_unref (loop); return EXIT_SUCCESS; } diff --git a/testsuite/test-regex.c b/testsuite/test-regex.c index 55a3e8b05f9c5950f8d8b5dab5d13b2913b85ce9..c1add0e941f9d1c02ba0e9a064e8f3daa7027906 100644 --- a/testsuite/test-regex.c +++ b/testsuite/test-regex.c @@ -217,7 +217,7 @@ test_issue_198 (void) GError *error = NULL; ImplRegex *re = impl_regex_new ("(a)*", 0, 0, &error); ImplMatchInfo *mi = NULL; - g_autofree char *aaa = g_malloc (8192); + char *aaa = g_malloc (8192); gboolean r; g_assert_no_error (error); @@ -230,6 +230,7 @@ test_issue_198 (void) g_assert_nonnull (mi); g_assert_true (r); + g_free (aaa); g_clear_pointer (&mi, impl_match_info_free); g_clear_pointer (&re, impl_regex_unref); }