Skip to contentSkip to conversation

tools/lib/traceevent: Fix build warning on 32-bit arches

PATCH New Tzvetomir Stoyanov (VMware) 1 participant 1 message Sep 2, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/lib/traceevent: Fix build warning on 32-bit arches

Fixed a compilation warning for casting to pointer from integer of different size on 32-bit platforms.

---
 tools/lib/traceevent/event-parse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/traceevent/event-parse.c +1 -1
index 3ba566de821c..5acc18b32606 100644
@@ -5259,7 +5259,7 @@ static int print_arg_pointer(struct trace_seq *s, const char *format, int plen,
 	default:
 		ret = 0;
 		val = eval_num_arg(data, size, event, arg);
-		trace_seq_printf(s, "%p", (void *)val);
+		trace_seq_printf(s, "%p", (void *)(intptr_t)val);
 		break;
 	}
 
Signature · 1 line
2.26.2