]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ssp.c (__guard_setup): Suppress unused variable warning.
authorJonathan Yong <10walls@gmail.com>
Sun, 2 Apr 2017 00:35:58 +0000 (00:35 +0000)
committerJonathan Yong <jyong@gcc.gnu.org>
Sun, 2 Apr 2017 00:35:58 +0000 (00:35 +0000)
2017-04-01  Jonathan Yong  <10walls@gmail.com>

* ssp.c (__guard_setup): Suppress unused variable warning.

From-SVN: r246636

libssp/ChangeLog
libssp/ssp.c

index d851d4bf24d19977384dfb953998479abb967a2a..65733b08ac68960dfd4ec548c209109c866c2377 100644 (file)
@@ -1,3 +1,7 @@
+2017-04-01  Jonathan Yong  <10walls@gmail.com>
+
+       * ssp.c (__guard_setup): Suppress unused variable warning.
+
 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
 
        PR other/79046
index d1da6615632b737fd91de977f394d663a1524dc6..536fb917a49f4305d3c6e2b773a02239a25e4738 100644 (file)
@@ -72,7 +72,6 @@ static void __attribute__ ((constructor))
 __guard_setup (void)
 {
   unsigned char *p;
-  int fd;
 
   if (__stack_chk_guard != 0)
     return;
@@ -91,7 +90,7 @@ __guard_setup (void)
       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,