Re: [PATCH] Avoid spurious gcc warning in debugger.c

Subject: Re: [PATCH] Avoid spurious gcc warning in debugger.c

Date: Sun, 21 Oct 2018 10:34:51 -0300

To: Daniel Kahn Gillmor, Notmuch Mail

Cc:

From: David Bremner


Daniel Kahn Gillmor <dkg@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
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: