This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Suppress ssp.c unused variable warning on mingw
- From: Jakub Jelinek <jakub at redhat dot com>
- To: JonY <10walls at gmail dot com>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>, NightStrike <nightstrike at gmail dot com>
- Date: Sat, 1 Apr 2017 09:07:33 +0200
- Subject: Re: [PATCH] Suppress ssp.c unused variable warning on mingw
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 232889E183
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 232889E183
- References: <9c34a6b6-c4d2-2444-685d-7a8b7be74da0@gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sat, Apr 01, 2017 at 03:35:35AM +0000, JonY wrote:
> This suppresses an unused variable warning for mingw*, patch OK?
Ok.
> Index: libssp/ssp.c
> ===================================================================
> --- libssp/ssp.c (revision 246630)
> +++ libssp/ssp.c (working copy)
> @@ -72,7 +72,6 @@
> __guard_setup (void)
> {
> unsigned char *p;
> - int fd;
>
> if (__stack_chk_guard != 0)
> return;
> @@ -91,7 +90,7 @@
> CryptReleaseContext(hprovider, 0);
> }
> #else
> - fd = open ("/dev/urandom", O_RDONLY);
> + int fd = open ("/dev/urandom", O_RDONLY);
> if (fd != -1)
> {
> ssize_t size = read (fd, &__stack_chk_guard,
>
>
> Changelog:
> 2017-04-01 Jonathan Yong <10walls@gmail.com>
>
> * ssp.c (__guard_setup): Suppress unused variable warning.
>
>
Jakub