stp/stp-format.patch

30 lines
933 B
Diff
Raw Normal View History

2016-02-21 03:17:01 +00:00
--- tools/rewrite_rule_gen/rewrite_rule_gen.cpp.orig 2015-11-22 12:32:02.000000000 -0700
+++ tools/rewrite_rule_gen/rewrite_rule_gen.cpp 2016-02-20 20:08:02.920074762 -0700
@@ -1228,7 +1228,7 @@
for (size_t i = 0; i < n.Degree(); i++)
{
char t[1000];
- sprintf(t, "%s[%d]", current.c_str(), i);
+ sprintf(t, "%s[%zu]", current.c_str(), i);
string s(t);
rule_to_string(n[i], names, s, sofar);
}
@@ -1247,7 +1247,7 @@
for (size_t i = 0; i < n.Degree(); i++)
{
char t[1000];
- sprintf(t, "%s[%d]", current.c_str(), i);
+ sprintf(t, "%s[%zu]", current.c_str(), i);
string s(t);
string r = containsNode(n[i], hunting, s);
if (r != "")
@@ -1477,7 +1477,7 @@
for (size_t i = 0; i < n.Degree(); i++)
{
char t[1000];
- sprintf(t, "%s[%d]", current.c_str(), i);
+ sprintf(t, "%s[%zu]", current.c_str(), i);
string s(t);
visit_all(n[i], visited, s);
}