From 1f0255ab650b59ef8acafb57b23900f7d89046f7 Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Tue, 27 Aug 2013 22:03:50 +0200 Subject: Fix constness warnings issued by gcc 4.7 --- lib/Solver/STPBuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Solver/STPBuilder.cpp') diff --git a/lib/Solver/STPBuilder.cpp b/lib/Solver/STPBuilder.cpp index 789eb244..90252656 100644 --- a/lib/Solver/STPBuilder.cpp +++ b/lib/Solver/STPBuilder.cpp @@ -435,7 +435,7 @@ ExprHandle STPBuilder::constructSDivByConstant(ExprHandle expr_n, unsigned width // STP uniques arrays by name, so we make sure the name is unique by // including the address. char buf[32]; - unsigned const addrlen = sprintf(buf, "_%p", (void*)root) + 1; // +1 for null-termination + unsigned const addrlen = sprintf(buf, "_%p", (const void*)root) + 1; // +1 for null-termination unsigned const space = (root->name.length() > 32 - addrlen)?(32 - addrlen):root->name.length(); memmove(buf + space, buf, addrlen); // moving the address part to the end memcpy(buf, root->name.c_str(), space); // filling out the name part -- cgit 1.4.1