From: Magnus Jacobsson Date: Tue, 19 Oct 2021 05:15:02 +0000 (+0200) Subject: sfio: correct misleading indentation in REINIT macro definition X-Git-Tag: 2.49.3~2^2~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7f21a7219cbca7751af2742c18ba054c96731007;p=graphviz sfio: correct misleading indentation in REINIT 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:114:25: error: this ‘for’ clause does not guard... [-Werror=misleading-indentation] 114 | { for(d = f->disc; d && !d->iof; d = d->disc) ; \ | ^~~ ../lib/sfio/sfdisc.c:119:9: note: in expansion of macro ‘REINIT’ 119 | REINIT(oreadf, readf, Sfread_f); | ^~~~~~ ../lib/sfio/sfdisc.c:115:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 115 | if(DISCF(d,iof,type) != oiof) \ | ^~ ../lib/sfio/sfdisc.c:119:9: note: in expansion of macro ‘REINIT’ 119 | REINIT(oreadf, readf, Sfread_f); | ^~~~~~ --- diff --git a/lib/sfio/sfdisc.c b/lib/sfio/sfdisc.c index 786cf662f..ac932a959 100644 --- a/lib/sfio/sfdisc.c +++ b/lib/sfio/sfdisc.c @@ -112,7 +112,8 @@ Sfdisc_t *sfdisc(Sfio_t * f, Sfdisc_t * disc) #define DISCF(dst,iof,type) (dst ? dst->iof : NULL) #define REINIT(oiof,iof,type) \ if(!reinit) \ - { for(d = f->disc; d && !d->iof; d = d->disc) ; \ + { for(d = f->disc; d && !d->iof; d = d->disc) \ + ; \ if(DISCF(d,iof,type) != oiof) \ reinit = 1; \ }