]> git.notmuchmail.org Git - notmuch/commit
Avoid spurious gcc warning in debugger.c
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sat, 6 Oct 2018 20:34:49 +0000 (15:34 -0500)
committerDavid Bremner <david@tethera.net>
Sun, 21 Oct 2018 13:25:07 +0000 (10:25 -0300)
commitdaec80eedabcafaf85ac58802451d165e0696745
tree4b75ae53f56d6ff25def901e22939c8a48b28552
parentf5411574afd34d580e3c1256c4f0807974099fcf
Avoid spurious gcc warning in debugger.c

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.
debugger.c