diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2017-01-30 16:47:26 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2017-02-06 23:43:46 +0100 |
commit | 9529ed33af0ca22c1716ab8e9628f7cb70733cc0 (patch) | |
tree | 7d79820d0334132c8510a1bfc460873934dbb083 /user_call | |
parent | d975e83dee7fdcd68e5ef4c2c10c24ec486d3328 (diff) |
user_call: Fix warning about void pointer arithmetic.
user_io.c
user_io.c: In function ‘flush_output’:
user_io.c:70:7: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
buf += paclen_out;
^~
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'user_call')
-rw-r--r-- | user_call/user_io.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/user_call/user_io.c b/user_call/user_io.c index 0a25136..3c7e9d5 100644 --- a/user_call/user_io.c +++ b/user_call/user_io.c @@ -62,12 +62,13 @@ void end_compress(void) static int flush_output(int fd, const void *buf, size_t count) { + const unsigned char *byte = buf; int cnt = count; while (cnt > 0) { - if (write(fd, buf, min(paclen_out, cnt)) < 0) + if (write(fd, byte, min(paclen_out, cnt)) < 0) return -1; - buf += paclen_out; + byte += paclen_out; cnt -= paclen_out; } |