]> granicus.if.org Git - graphviz/commit
sfio: correct misleading indentation in GETDISCF macro definition
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 19 Oct 2021 05:15:02 +0000 (07:15 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Thu, 21 Oct 2021 20:58:32 +0000 (22:58 +0200)
commit9bafcc84da8e3384325dc675b3f9a6f6181683f4
tree3f2c50c1a76012be25e8b12b0dfe8408ecb6e7b6
parent5a7c99915df383f050bd1f7dd3eeffd2857f3c88
sfio: correct misleading indentation in GETDISCF macro definition

Fixes errors like this when building with CMake (which uses -Wall,
-Wextra and -Werror) on Ubuntu 21.10 with gcc 11.2.0.

../lib/sfio/sfdisc.c:68:11: error: this ‘for’ clause does not guard... [-Werror=misleading-indentation]
   68 |         { for(d = f->disc; d && !d->iof; d = d->disc) ; \
      |           ^~~
../lib/sfio/sfdisc.c:71:5: note: in expansion of macro ‘GETDISCF’
   71 |     GETDISCF(oreadf, readf, Sfread_f);
      |     ^~~~~~~~
../lib/sfio/sfdisc.c:71:14: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
   71 |     GETDISCF(oreadf, readf, Sfread_f);
      |              ^~~~~~
../lib/sfio/sfdisc.c:69:11: note: in definition of macro ‘GETDISCF’
   69 |           func = d ? d->iof : NULL; \
      |           ^~~~
lib/sfio/sfdisc.c