summaryrefslogtreecommitdiff
path: root/ld/lexsup.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2020-12-14 12:40:13 +0000
committerNick Clifton <nickc@redhat.com>2020-12-14 12:40:13 +0000
commit3991c7acb29aa8d7d52150695eb3efa03a08dd50 (patch)
tree62c8113c6e4b053fdb8c82ecae0cb92e61499a0d /ld/lexsup.c
parent6abe7848fa4140b3cb79c6810758b21562efdc0d (diff)
downloadbinutils-gdb-3991c7acb29aa8d7d52150695eb3efa03a08dd50.tar.gz
Fix a use of an uninitialised variable in the bfd linker.
PR 27050 * lexsup.c (parse_args): Ensure that the longind local variable is set.
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r--ld/lexsup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 0d10bc6fba8..88e33a17a08 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -718,7 +718,7 @@ parse_args (unsigned argc, char **argv)
last_optind = -1;
while (1)
{
- int longind;
+ int longind = 0;
int optc;
static unsigned int defsym_count;