shut up gcc
diff --git a/src/cmd/samterm/mesg.c b/src/cmd/samterm/mesg.c
index 01e54ac..fb02373 100644
--- a/src/cmd/samterm/mesg.c
+++ b/src/cmd/samterm/mesg.c
@@ -331,7 +331,7 @@
 void
 startfile(Text *t)
 {
-	outTsv(Tstartfile, t->tag, (vlong)t);		/* for 64-bit pointers */
+	outTsv(Tstartfile, t->tag, (vlong)(uintptr)t);		/* for 64-bit pointers */
 	setlock();
 }
 
@@ -339,7 +339,7 @@
 startnewfile(int type, Text *t)
 {
 	t->tag = Untagged;
-	outTv(type, (vlong)t);				/* for 64-bit pointers */
+	outTv(type, (vlong)(uintptr)t);				/* for 64-bit pointers */
 }
 
 int