[glib: 1/3] test_paths: Reindent to avoid tripping -Wmisleading-indentation



commit 51d566ba6e657ece9769e03dbdaa7bd64c3f45f5
Author: Iain Lane <iainl gnome org>
Date:   Thu May 24 12:58:12 2018 +0100

    test_paths: Reindent to avoid tripping -Wmisleading-indentation
    
    This fixes:
    
    glib/tests/testglib.c: In function ‘test_paths’:
    glib/tests/testglib.c:955:3: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
       if (g_test_verbose ())
       ^~
    glib/tests/testglib.c:958:5: note: ...this statement, but the latter is misleadingly indented as if it 
were guarded by the ‘if’
         {
         ^
    
    https://bugzilla.gnome.org/show_bug.cgi?id=796385

 tests/testglib.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/tests/testglib.c b/tests/testglib.c
index ca9153a13..f29bbc664 100644
--- a/tests/testglib.c
+++ b/tests/testglib.c
@@ -955,18 +955,18 @@ test_paths (void)
   if (g_test_verbose ())
     g_printerr ("checking g_canonicalize_filename() supports NULL...");
 
-    {
-      const gchar *relative_path = "./";
-      gchar *canonical_path = g_canonicalize_filename (relative_path, NULL);
-      gchar *cwd = g_get_current_dir ();
-      if (g_strcmp0 (canonical_path, cwd) != 0)
-        {
-          g_error ("\nfailed for \"%s\"==\"%s\" (returned: \"%s\")\n",
-                   relative_path, cwd, canonical_path);
-        }
-      g_free (cwd);
-      g_free (canonical_path);
-    }
+  {
+    const gchar *relative_path = "./";
+    gchar *canonical_path = g_canonicalize_filename (relative_path, NULL);
+    gchar *cwd = g_get_current_dir ();
+    if (g_strcmp0 (canonical_path, cwd) != 0)
+      {
+        g_error ("\nfailed for \"%s\"==\"%s\" (returned: \"%s\")\n",
+                 relative_path, cwd, canonical_path);
+      }
+    g_free (cwd);
+    g_free (canonical_path);
+  }
 
   if (g_test_verbose ())
     g_printerr ("ok\n");


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