aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-03-20 23:35:32 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-11-16 20:36:28 +0100
commit3f3a12589b206efe7089520c2f2a1f49245e1dd2 (patch)
tree8dc1806f541c33df4dd122396a0408cb3b923f03
parent37a824078ff8a581cbbedb1ba8b4beb10d8a82e6 (diff)
downloadsparse-dev-3f3a12589b206efe7089520c2f2a1f49245e1dd2.tar.gz
don't output value of anonymous symbol's pointer
The value of this pointer is of no use unless you're using a debugger (or just to see if two things are identical or not) and it's presence produces noise when comparing the output of two runs for testing. Change this by issuing it only if 'verbose' is set. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--linearize.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linearize.c b/linearize.c
index 3fb4c15c..e9cfe7c6 100644
--- a/linearize.c
+++ b/linearize.c
@@ -120,7 +120,7 @@ const char *show_pseudo(pseudo_t pseudo)
break;
}
expr = sym->initializer;
- snprintf(buf, 64, "<anon symbol:%p>", sym);
+ snprintf(buf, 64, "<anon symbol:%p>", verbose ? sym : NULL);
if (expr) {
switch (expr->type) {
case EXPR_VALUE:
@@ -328,7 +328,7 @@ const char *show_instruction(struct instruction *insn)
buf += sprintf(buf, "%s", show_ident(sym->ident));
break;
}
- buf += sprintf(buf, "<anon symbol:%p>", sym);
+ buf += sprintf(buf, "<anon symbol:%p>", verbose ? sym : NULL);
break;
}