(Duplicate representation of merged trees): Add casts to pacify g++.

This commit is contained in:
Paul Eggert
2005-09-08 18:41:46 +00:00
parent 7e7b77c138
commit 7812f29985

View File

@@ -389,7 +389,8 @@ static char *
make_value (char *parent, char *child) make_value (char *parent, char *child)
{ {
char const format[] = "%s <- %s"; char const format[] = "%s <- %s";
char *value = malloc (strlen (parent) + strlen (child) + sizeof format); char *value =
(char *) malloc (strlen (parent) + strlen (child) + sizeof format);
sprintf (value, format, parent, child); sprintf (value, format, parent, child);
return value; return value;
} }
@@ -398,7 +399,8 @@ static char *
merge (YYSTYPE s1, YYSTYPE s2) merge (YYSTYPE s1, YYSTYPE s2)
{ {
char const format[] = "merge{ %s and %s }"; char const format[] = "merge{ %s and %s }";
char *value = malloc (strlen (s1.ptr) + strlen (s2.ptr) + sizeof format); char *value =
(char *) malloc (strlen (s1.ptr) + strlen (s2.ptr) + sizeof format);
sprintf (value, format, s1.ptr, s2.ptr); sprintf (value, format, s1.ptr, s2.ptr);
return value; return value;
} }