stp/stp-format.patch

21 lines
794 B
Diff

--- stp-2.3.3/tools/rewrite_rule_gen/rewrite_rule_gen.cpp.orig 2017-11-16 15:35:07.000000000 -0700
+++ stp-2.3.3/tools/rewrite_rule_gen/rewrite_rule_gen.cpp 2017-11-25 08:42:45.331112638 -0700
@@ -1223,7 +1223,7 @@ void rule_to_string(const ASTNode& n, AS
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);
}
@@ -1242,7 +1242,7 @@ string containsNode(const ASTNode& n, co
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 != "")