Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Silence compilation warnings about setuid, setgid
- X-seq: zsh-workers 43005
- From: dana <dana@xxxxxxx>
- To: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- Subject: Re: [PATCH] Silence compilation warnings about setuid, setgid
- Date: Wed, 13 Jun 2018 13:41:25 -0500
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=A9DaEqbypPbVp2tNZhdMp5FJ+zTzRfaT0EzPTbLXzd8=; b=ooFZO/EiRe4ABi/mK+Qi035aHED+vd62qZZamsGUaNBJ+G8z3prDqttjqfhWjoG6Dz LJDJC7vrkNxgMcyQfHCH2Nh2CBcF63APJKvka14KmDpxSPvnMJW8wZXhNkH3bxq+DeK5 Toe7uOEQ5j3B3X+2sCMxODKB2I4E1QUea+SnGcGf5BBhpvMiNgRIu6HGMUh70VF6W0o2 iBH9/sr3/8+bFDCSG3DgVHjFWq9Gciy2Ul2nUSSl2a/k0PMKj4TQrU0Kae2Y0N/Z6Xb6 J634HD2A7gzvaoVz57JrmBw770c1WDAPFnq6/ALBMWtuiGS3RWaYJy0Zlq7r83mx8PqV cuOw==
- In-reply-to: <20180613171924eucas1p1ffdbcc9252255b19e36788fd06a7f582~3x_Aqkahf0839108391eucas1p1U@eucas1p1.samsung.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVBWHsOhpC7mZcL4DA0ih=3yJF-HYe+We=r0q1oXA_s38g@mail.gmail.com> <CGME20180613115039epcas5p3f7e70bdce12919686a5dec9895782138@epcas5p3.samsung.com> <CAF6rxgmVA5KtcRoaVZi5P=6OtQdLPzHJowbBm+eyp0Zjea19Sg@mail.gmail.com> <20180613131021eucas1p263704fa9832375e6a49cf7f2077606dc~3ukj6hhqT1702017020eucas1p2W@eucas1p2.samsung.com> <CAH+w=7Z5hNeLpoUkGDMnuk3PRF3BX7+z=EdHQHTVtj1pgasrAA@mail.gmail.com> <CAF6rxg=Y1BSfoQLMgyLj4ahJcRp36AN8n2=hwFgxqQ4h0VkAYw@mail.gmail.com> <20180613171924eucas1p1ffdbcc9252255b19e36788fd06a7f582~3x_Aqkahf0839108391eucas1p1U@eucas1p1.samsung.com>
On 13 Jun 2018, at 12:19, Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
>+ (void)setgid(getgid());
Casting to void doesn't actually silence this warning with (at least some
versions of) GCC/glibc. If the function has the warn_unused_result attribute,
you have to (a) disable the warning entirely, (b) actually use the result
somehow, or (c) use some hack like this:
http://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/ignore-value.h
dana
Messages sorted by:
Reverse Date,
Date,
Thread,
Author