[PATCH] Avoid spurious gcc warning in debugger.c

David Bremner david at tethera.net
Sun Oct 21 06:34:51 PDT 2018


Daniel Kahn Gillmor <dkg at fifthhorseman.net> writes:

> Without this patch, gcc 8.2.0-7 complains:
>
> debugger.c: In function ‘debugger_is_active’:
> debugger.c:40:24: warning: passing argument 2 to restrict-qualified parameter aliases with argument 1 [-Wrestrict]
>      if (readlink (buf, buf, sizeof (buf)) != -1 &&
>                    ~~~  ^~~
>
> This is pretty silly, but it seems simplest to just avoid passing the
> same buffer to readlink as both pathname and buf.

pushed,

d


More information about the notmuch mailing list