Commit 723f415e by Bernd Edlinger Committed by Bernd Edlinger

2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>

        hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.

From-SVN: r262931
parent 9fede15c
2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
2018-07-23 Segher Boessenkool <segher@kernel.crashing.org> 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust. * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
......
...@@ -776,11 +776,11 @@ static void ...@@ -776,11 +776,11 @@ static void
dump_hsa_symbol (FILE *f, hsa_symbol *symbol) dump_hsa_symbol (FILE *f, hsa_symbol *symbol)
{ {
const char *name; const char *name;
char buf[64];
if (symbol->m_name) if (symbol->m_name)
name = symbol->m_name; name = symbol->m_name;
else else
{ {
char buf[64];
sprintf (buf, "__%s_%i", hsa_seg_name (symbol->m_segment), sprintf (buf, "__%s_%i", hsa_seg_name (symbol->m_segment),
symbol->m_name_number); symbol->m_name_number);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment