aboutsummaryrefslogtreecommitdiff
path: root/libssp
diff options
context:
space:
mode:
authorJonathan Yong <10walls@gmail.com>2017-04-02 00:35:58 +0000
committerJonathan Yong <10walls@gmail.com>2017-04-02 00:35:58 +0000
commitd0fa67cbf672173dfc493237fb3d46fc8eccf5be (patch)
treec8bfdac2a83c924f58a81abb7f9c1463c678415a /libssp
parentc6eca692305633fd44eaf8ebbf6e627be034f55a (diff)
2017-04-01 Jonathan Yong <10walls@gmail.com>
* ssp.c (__guard_setup): Suppress unused variable warning. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@246636 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libssp')
-rw-r--r--libssp/ChangeLog4
-rw-r--r--libssp/ssp.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/libssp/ChangeLog b/libssp/ChangeLog
index d851d4bf24d..65733b08ac6 100644
--- a/libssp/ChangeLog
+++ b/libssp/ChangeLog
@@ -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
diff --git a/libssp/ssp.c b/libssp/ssp.c
index d1da6615632..536fb917a49 100644
--- a/libssp/ssp.c
+++ b/libssp/ssp.c
@@ -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,