From bfefc27c2bb4af62e09569e36b018d60da98a680 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Tue, 29 Mar 2016 19:00:33 -0400 Subject: [PATCH] Avoid doing arithmetic on void pointers. Whatever compiler settings AOSP is using warns that this is a GNU extension. Change-Id: Ife395d2b206b607b14c713cbb5a94d479816dad0 Reviewed-on: https://boringssl-review.googlesource.com/7604 Reviewed-by: Steven Valdez Reviewed-by: David Benjamin --- crypto/cpu-arm-linux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crypto/cpu-arm-linux.c b/crypto/cpu-arm-linux.c index 342fed2b..ab4648ce 100644 --- a/crypto/cpu-arm-linux.c +++ b/crypto/cpu-arm-linux.c @@ -64,12 +64,13 @@ static ssize_t read_eintr(int fd, void *out, size_t len) { /* read_full reads exactly |len| bytes from |fd| to |out|. On error or end of * file, it returns zero. */ static int read_full(int fd, void *out, size_t len) { + char *outp = out; while (len > 0) { - ssize_t ret = read_eintr(fd, out, len); + ssize_t ret = read_eintr(fd, outp, len); if (ret <= 0) { return 0; } - out += ret; + outp += ret; len -= ret; } return 1;