From dd9977e9d827caaa0712c625804cade660dd5beb Mon Sep 17 00:00:00 2001 From: ghazi Date: Sun, 19 Nov 2000 13:15:51 +0000 Subject: Warning fixes: * builtins.c (c_getstr): Constify variable. * gmon-sol2.c (_mcleanup): Comment out #endif labels. * conflict.c (const_conflict_graph_arc): New typedef. (arc_hash, arc_eq): Avoid needlessly casting away const-ness. * cppmacro.c (builtin_macro): Likewise. * dwarf2out.c (output_comp_unit): Constify variable. * fix-header.c (v_fatal): Add ATTRIBUTE_PRINTF. * protoize.c (IS_SAME_PATH_CHAR): Use TOUPPER, not toupper. * ssa.c (ssa_rename_from_hash_function): Avoid needlessly casting away const-ness. * tradcpp.c (rescan, do_line, macroexpand, macarg): Use ISALNUM/ISDIGIT/ISPRINT, not isalnum/isdigit/isprint. * varasm.c (const_str_htab_hash, const_str_htab_eq, compare_constant_1, record_constant_1): Constify. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37565 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/dwarf2out.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gcc/dwarf2out.c') diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index dba01479894..6ddd9824d16 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -6110,7 +6110,7 @@ static void output_comp_unit (die) dw_die_ref die; { - char *secname; + const char *secname; if (die->die_child == 0) return; @@ -6126,12 +6126,13 @@ output_comp_unit (die) if (die->die_symbol) { - secname = (char *) alloca (strlen (die->die_symbol) + 24); - sprintf (secname, ".gnu.linkonce.wi.%s", die->die_symbol); + char *tmp = (char *) alloca (strlen (die->die_symbol) + 24); + sprintf (tmp, ".gnu.linkonce.wi.%s", die->die_symbol); + secname = tmp; die->die_symbol = NULL; } else - secname = (char *) DEBUG_INFO_SECTION; + secname = (const char *) DEBUG_INFO_SECTION; /* Output debugging information. */ fputc ('\n', asm_out_file); -- cgit v1.2.1