diff options
author | Andrew Cagney <ac131313@redhat.com> | 2001-08-03 15:42:25 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@gcc.gnu.org> | 2001-08-03 15:42:25 +0000 |
commit | 0821bff7567934ec40bb8bee8a0d63b6cf8513bb (patch) | |
tree | 47871d94edce45fd626711d5c92b3df631915fb6 /gcc/dwarf2out.c | |
parent | b953cc4be9cf01fac70fc67fe14a421e1a7af0c5 (diff) | |
download | gcc-0821bff7567934ec40bb8bee8a0d63b6cf8513bb.zip gcc-0821bff7567934ec40bb8bee8a0d63b6cf8513bb.tar.gz gcc-0821bff7567934ec40bb8bee8a0d63b6cf8513bb.tar.bz2 |
mkdeps.c (deps_add_default_target): Make local variable ``start'' a const char pointer.
* mkdeps.c (deps_add_default_target): Make local variable
``start'' a const char pointer.
* dwarf2out.c (compute_section_prefix): Localize use of ``p''.
From-SVN: r44600
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 0c34ab8..bf72954 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -5397,7 +5397,7 @@ static void compute_section_prefix (unit_die) dw_die_ref unit_die; { - char *p, *name; + char *name; int i; unsigned char checksum[16]; struct md5_ctx ctx; @@ -5406,18 +5406,22 @@ compute_section_prefix (unit_die) die_checksum (unit_die, &ctx); md5_finish_ctx (&ctx, checksum); - p = lbasename (get_AT_string (unit_die, DW_AT_name)); - name = (char *) alloca (strlen (p) + 64); - sprintf (name, "%s.", p); + { + const char *p = lbasename (get_AT_string (unit_die, DW_AT_name)); + name = (char *) alloca (strlen (p) + 64); + sprintf (name, "%s.", p); + } clean_symbol_name (name); - p = name + strlen (name); - for (i = 0; i < 4; ++i) - { - sprintf (p, "%.2x", checksum[i]); - p += 2; - } + { + char *p = name + strlen (name); + for (i = 0; i < 4; ++i) + { + sprintf (p, "%.2x", checksum[i]); + p += 2; + } + } comdat_symbol_id = unit_die->die_symbol = xstrdup (name); comdat_symbol_number = 0; |