From: Magnus Jacobsson Date: Tue, 19 Oct 2021 05:15:02 +0000 (+0200) Subject: sfio: correct misleading indentation in SFnputc macro definition X-Git-Tag: 2.49.3~2^2~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f5ee54826e53ba446c85ca8afe15a228bcd8c1a7;p=graphviz sfio: correct misleading indentation in SFnputc 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/sfvprintf.c:76:13: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation] 76 | if(n != w) goto done; n = 0;\ | ^~ ../lib/sfio/sfvprintf.c:511:25: note: in expansion of macro ‘SFnputc’ 511 | SFnputc(f, '0', n); | ^~~~~~~ ../lib/sfio/sfvprintf.c:511:41: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 511 | SFnputc(f, '0', n); | ^ ../lib/sfio/sfvprintf.c:76:35: note: in definition of macro ‘SFnputc’ 76 | if(n != w) goto done; n = 0;\ | ^ --- diff --git a/lib/sfio/sfvprintf.c b/lib/sfio/sfvprintf.c index cbff69349..d997e52e1 100644 --- a/lib/sfio/sfvprintf.c +++ b/lib/sfio/sfvprintf.c @@ -73,7 +73,8 @@ int sfvprintf(Sfio_t * f, const char *form, va_list args) { if((endd-d) >= n) { while(n--) *d++ = (uchar)c; } \ else \ { SFEND(f); n_output += (w = SFNPUTC(f,c,n)) > 0 ? w : 0; SFBUF(f); \ - if(n != w) goto done; n = 0;\ + if(n != w) goto done; \ + n = 0; \ } \ } #define SFwrite(f,s,n) \