Mercurial > gnulib
changeset 18269:5b63f09aa398
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)
^~
author | Jim Meyering <meyering@fb.com> |
---|---|
date | Thu, 17 Mar 2016 10:35:08 -0700 |
parents | d9ea5bcc39ac |
children | 5431f70daefe |
files | ChangeLog tests/test-userspec.c |
diffstat | 2 files changed, 16 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Mar 15 13:10:56 2016 -0700 +++ b/ChangeLog Thu Mar 17 10:35:08 2016 -0700 @@ -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
--- a/tests/test-userspec.c Tue Mar 15 13:10:56 2016 -0700 +++ b/tests/test-userspec.c Thu Mar 17 10:35:08 2016 -0700 @@ -173,12 +173,9 @@ 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. */