shithub: riscv

Download patch

ref: ffcac11a5a1215a831d7a1421ce808a13d56bfc2
parent: 0b1c655160eab79a8066174c113f2025a83dc14c
author: mischief <mischief@offblast.org>
date: Tue Feb 4 18:34:19 EST 2014

libpanel: fix pointer casts and format strings

--- a/sys/src/cmd/mothra/libpanel/mem.c
+++ b/sys/src/cmd/mothra/libpanel/mem.c
@@ -25,7 +25,7 @@
 	return v;
 }
 void pl_unexpected(Panel *g, char *rou){
-	fprint(2, "%s called unexpectedly (%s %lux)\n", rou, g->kind, (ulong)g);
+	fprint(2, "%s called unexpectedly (%s %#p)\n", rou, g->kind, (uintptr)g);
 	abort();
 }
 void pl_drawerror(Panel *g){
@@ -62,7 +62,7 @@
 Panel *pl_newpanel(Panel *parent, int ndata){
 	Panel *v;
 	if(parent && parent->flags&LEAF){
-		fprint(2, "newpanel: can't create child of %s %lux\n", parent->kind, (ulong)parent);
+		fprint(2, "newpanel: can't create child of %s %#p\n", parent->kind, (uintptr)parent);
 		exits("bad newpanel");
 	}
 	v=pl_emalloc(sizeof(Panel));