[binutils-gdb] ld/emultempl/msp430.em: Remove unused variable
Jozef Lawrynowicz
jozefl@sourceware.org
Thu Aug 27 19:11:50 GMT 2020
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=82b946165d1559e69f9b039e1acdc698e7c374f5
commit 82b946165d1559e69f9b039e1acdc698e7c374f5
Author: Jozef Lawrynowicz <jozef.l@mittosystems.com>
Date: Thu Aug 27 18:17:43 2020 +0100
ld/emultempl/msp430.em: Remove unused variable
ld/ChangeLog:
* emultempl/msp430.em: Remove unused variable "buf".
Diff:
---
ld/ChangeLog | 4 ++++
ld/emultempl/msp430.em | 4 +---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 4fd5546e929..7881dd1f0fc 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,7 @@
+2020-08-27 Jozef Lawrynowicz <jozef.l@mittosystems.com>
+
+ * emultempl/msp430.em: Remove unused variable "buf".
+
2020-08-27 Nick Alcock <nick.alcock@oracle.com>
* ldlang.c (dump_ctf_errs): Unquote CTF error messages.
diff --git a/ld/emultempl/msp430.em b/ld/emultempl/msp430.em
index 2a840c1e2bf..a47998a00a9 100644
--- a/ld/emultempl/msp430.em
+++ b/ld/emultempl/msp430.em
@@ -261,7 +261,6 @@ gld${EMULATION_NAME}_place_orphan (asection * s,
char * lower_name;
char * upper_name;
char * name;
- char * buf = NULL;
lang_output_section_statement_type * lower;
lang_output_section_statement_type * upper;
@@ -294,7 +293,7 @@ gld${EMULATION_NAME}_place_orphan (asection * s,
only use the part of the name before the second dot. */
if (strchr (secname + 1, '.') != NULL)
{
- buf = name = xstrdup (secname);
+ name = xstrdup (secname);
* strchr (name + 1, '.') = 0;
}
@@ -330,7 +329,6 @@ gld${EMULATION_NAME}_place_orphan (asection * s,
end:
free (upper_name);
free (lower_name);
- free (buf);
return lower;
}
EOF
More information about the Binutils-cvs
mailing list