public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Suppress ssp.c unused variable warning on mingw
@ 2017-04-01  3:41 JonY
  2017-04-01  7:07 ` Jakub Jelinek
  0 siblings, 1 reply; 2+ messages in thread
From: JonY @ 2017-04-01  3:41 UTC (permalink / raw)
  To: Gcc Patch List; +Cc: NightStrike


[-- Attachment #1.1: Type: text/plain, Size: 746 bytes --]

Hi,

This suppresses an unused variable warning for mingw*, patch 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.



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 858 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Suppress ssp.c unused variable warning on mingw
  2017-04-01  3:41 [PATCH] Suppress ssp.c unused variable warning on mingw JonY
@ 2017-04-01  7:07 ` Jakub Jelinek
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2017-04-01  7:07 UTC (permalink / raw)
  To: JonY; +Cc: Gcc Patch List, NightStrike

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-01  7:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-01  3:41 [PATCH] Suppress ssp.c unused variable warning on mingw JonY
2017-04-01  7:07 ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).