From d67cee19fefeae38e5e3c89cde369b76c0c2166f Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Fri, 19 Nov 2021 22:21:45 -0800 Subject: [PATCH] sfoutput: squash a -Wpointer-to-int-cast warning --- lib/sfio/sfwr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/sfio/sfwr.c b/lib/sfio/sfwr.c index ea91860da..368309180 100644 --- a/lib/sfio/sfwr.c +++ b/lib/sfio/sfwr.c @@ -10,6 +10,7 @@ #include #include +#include /* Write with discipline. ** @@ -33,7 +34,7 @@ static ssize_t sfoutput(Sfio_t * f, char *buf, size_t n) while ((ssize_t) n >= _Sfpage) { /* see if a hole of 0's starts here */ sp = buf + 1; if (buf[0] == 0 && buf[_Sfpage - 1] == 0) { /* check byte at a time until int-aligned */ - while (((ulong) sp) % sizeof(int)) { + while ((uintptr_t)sp % sizeof(int)) { if (*sp != 0) goto chk_hole; sp += 1; -- 2.40.0