shithub: riscv

Download patch

ref: 209a6b4b55101d58327830d7e1306dfb43ece531
parent: 34b69979332825b78c50f37013d60cc2657f322f
author: cinap_lenrek <[email protected]>
date: Fri Aug 3 12:53:50 EDT 2018

acme: pass pointer to int type to avoid pointer to int cast warning

--- a/sys/src/cmd/acme/exec.c
+++ b/sys/src/cmd/acme/exec.c
@@ -1120,9 +1120,7 @@
 static void
 fixindent(Window *w, void *v)
 {
-	int t;
-
-	t = (int)v;
+	int t = *(int*)v;
 	w->indent[t] = globalindent[t];
 }
 
@@ -1146,7 +1144,7 @@
 			ival = indentval(arg, narg-na, type);
 	}
 	if(ival == IGlobal)
-		allwindows(fixindent, (void*)type);
+		allwindows(fixindent, &type);
 	else if(w != nil && ival >= 0)
 		w->indent[type] = ival;
 }