This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Suppress ssp.c unused variable warning on mingw


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]