Commit 0821bff7 by Andrew Cagney Committed by Andrew Cagney

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
parent b953cc4b
2001-08-01 Andrew Cagney <ac131313@redhat.com>
* mkdeps.c (deps_add_default_target): Make local variable
``start'' a const char pointer.
* dwarf2out.c (compute_section_prefix): Localize use of ``p''.
2001-08-03 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> 2001-08-03 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* doc/install.texi (Configuration): Fix markup. * doc/install.texi (Configuration): Fix markup.
......
...@@ -5397,7 +5397,7 @@ static void ...@@ -5397,7 +5397,7 @@ static void
compute_section_prefix (unit_die) compute_section_prefix (unit_die)
dw_die_ref unit_die; dw_die_ref unit_die;
{ {
char *p, *name; char *name;
int i; int i;
unsigned char checksum[16]; unsigned char checksum[16];
struct md5_ctx ctx; struct md5_ctx ctx;
...@@ -5406,18 +5406,22 @@ compute_section_prefix (unit_die) ...@@ -5406,18 +5406,22 @@ compute_section_prefix (unit_die)
die_checksum (unit_die, &ctx); die_checksum (unit_die, &ctx);
md5_finish_ctx (&ctx, checksum); md5_finish_ctx (&ctx, checksum);
p = lbasename (get_AT_string (unit_die, DW_AT_name)); {
name = (char *) alloca (strlen (p) + 64); const char *p = lbasename (get_AT_string (unit_die, DW_AT_name));
sprintf (name, "%s.", p); name = (char *) alloca (strlen (p) + 64);
sprintf (name, "%s.", p);
}
clean_symbol_name (name); clean_symbol_name (name);
p = name + strlen (name); {
for (i = 0; i < 4; ++i) char *p = name + strlen (name);
{ for (i = 0; i < 4; ++i)
sprintf (p, "%.2x", checksum[i]); {
p += 2; sprintf (p, "%.2x", checksum[i]);
} p += 2;
}
}
comdat_symbol_id = unit_die->die_symbol = xstrdup (name); comdat_symbol_id = unit_die->die_symbol = xstrdup (name);
comdat_symbol_number = 0; comdat_symbol_number = 0;
......
...@@ -191,7 +191,7 @@ deps_add_default_target (d, tgt) ...@@ -191,7 +191,7 @@ deps_add_default_target (d, tgt)
#ifndef TARGET_OBJECT_SUFFIX #ifndef TARGET_OBJECT_SUFFIX
# define TARGET_OBJECT_SUFFIX ".o" # define TARGET_OBJECT_SUFFIX ".o"
#endif #endif
char *start = lbasename (tgt); const char *start = lbasename (tgt);
char *o = (char *) alloca (strlen (start) + strlen (TARGET_OBJECT_SUFFIX) + 1); char *o = (char *) alloca (strlen (start) + strlen (TARGET_OBJECT_SUFFIX) + 1);
char *suffix; char *suffix;
......
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