[PATCH app/xdm] Add missing brackets to multi-statement if in SaveServerAuthorizations

Julien Cristau jcristau at debian.org
Sun May 6 13:26:05 UTC 2018


On Sat, May  5, 2018 at 12:33:12 -0700, Alan Coopersmith wrote:

> Introduced by commit 5222d28e8d8e5b4cc
> 
> Reported by gcc 7.3:
> 
> auth.c: In function ‘SaveServerAuthorizations’:
> auth.c:447:6: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
>       if (auths[i]->data_length > 0)
>       ^~
> auth.c:452:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
>    (void) fflush (auth_file);
>    ^
> 
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
>  xdm/auth.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
Woops, sorry about that.  Thanks for the fix.

Cheers,
Julien


More information about the xorg-devel mailing list