]> Savannah Git Hosting - gnulib.git/commitdiff
test-userspec.c: do not trigger gcc's new -Wmisleading-indentation
authorJim Meyering <meyering@fb.com>
Thu, 17 Mar 2016 17:35:08 +0000 (10:35 -0700)
committerJim Meyering <meyering@fb.com>
Thu, 17 Mar 2016 17:37:51 +0000 (10:37 -0700)
* tests/test-userspec.c (main): Remove unnecessary braces and fix
misleading indentation. Here is the diagnostic gcc-6.0-to-be issued:
  test-userspec.c:176:9: error: statement is indented as if it were \
            guarded by... [-Werror=misleading-indentation]
           {
           ^
  test-userspec.c:173:7: note: ...this 'if' clause, but it is not
         if (!diag && !T[i].result)
         ^~

ChangeLog
tests/test-userspec.c

index 49180d97435feac4fca0b42627d9d04c4086c035..a2966d0c5fdd7cc9496d99e1e9fb84b8b020ef88 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2016-03-17  Jim Meyering  <meyering@fb.com>
+
+       test-userspec.c: do not trigger gcc's new -Wmisleading-indentation
+       * tests/test-userspec.c (main): Remove unnecessary braces and fix
+       misleading indentation. Here is the diagnostic gcc-6.0-to-be issued:
+         test-userspec.c:176:9: error: statement is indented as if it were \
+            guarded by... [-Werror=misleading-indentation]
+                  {
+                  ^
+         test-userspec.c:173:7: note: ...this 'if' clause, but it is not
+                if (!diag && !T[i].result)
+                ^~
+
 2016-03-15  Paul Eggert  <eggert@cs.ucla.edu>
 
        time_rz: port to clang -Wunused-const-variable
index 23e7007c5cbbaa53618dd779725f3cce4693c512..2dc1564c8168f6a011ef9e27ee99502cb3270b73 100644 (file)
@@ -173,12 +173,9 @@ main (void)
       if (!diag && !T[i].result)
         continue;
 
-        {
-          printf ("%s diagnostic mismatch (-: expected uid,gid; +:actual)\n"
-                  "-%s\n+%s\n",
-                  T[i].in, T[i].result, diag);
-          fail = 1;
-        }
+      printf ("%s diagnostic mismatch (-: expected uid,gid; +:actual)\n"
+              "-%s\n+%s\n", T[i].in, T[i].result, diag);
+      fail = 1;
     }
 
   /* Ensure NULL parameters are ignored.  */