From e8816b766304a58fca6c7cd59edb140e272778f9 Mon Sep 17 00:00:00 2001 From: Matthew Leeds Date: Fri, 22 Feb 2019 17:54:40 -0800 Subject: Remove extra newlines in variable definiton blocks Uncrustify has an option "nl_func_var_def_blk" which is supposed to ensure there's a newline character between the block of variable definitions and the rest of the function body, but it gets confused and thinks that the first instance of "g_autoptr" or "g_auto" being used on a variable is the start of the function body. So this commit removes those extra newline characters and removes that option in uncrustify.cfg so they don't get re-added the next time uncrustify is run. Here's the command I used: perl -0777 -i -pe 's/\n(\n\s*g_auto\()/\1/g' `git ls-tree --name-only -r HEAD | grep \\\.[ch]$ | grep -v common/valgrind-private.h | grep -v app/flatpak-polkit-agent-text-listener\\\.[ch]` I ran it again with "g_autoptr" in place of "g_auto", and made a few manual edits to add back the newline when the g_auto* was in the middle of a function body rather than at the top. Closes: #2715 Approved by: matthiasclasen --- icon-validator/validate-icon.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'icon-validator') diff --git a/icon-validator/validate-icon.c b/icon-validator/validate-icon.c index 6111f629..afd248bc 100644 --- a/icon-validator/validate-icon.c +++ b/icon-validator/validate-icon.c @@ -32,7 +32,6 @@ validate_icon (const char *arg_width, int width, height; const char *name; const char *allowed_formats[] = { "png", "jpeg", "svg", NULL }; - g_autoptr(GdkPixbuf) pixbuf = NULL; g_autoptr(GError) error = NULL; @@ -129,7 +128,6 @@ rerun_in_sandbox (const char *arg_width, { const char * const usrmerged_dirs[] = { "bin", "lib64", "lib", "sbin" }; int i; - g_autoptr(GPtrArray) args = g_ptr_array_new_with_free_func (g_free); g_autofree char *err = NULL; int status; -- cgit v1.2.1