db845c: qcom: Fix pointer arithmetic warnings.
Building the qcom tools, we see a lot of the following:
warning: arithmetic on a pointer to void is a GNU extension
Fix this by casting the void* ptrs to char* when doing pointer
arithmatic.
Change-Id: Id2b0098388406bfc434ee01344a39e3413cb281c
Signed-off-by: John Stultz <john.stultz@linaro.org>
diff --git a/qcom/rmtfs/storage.c b/qcom/rmtfs/storage.c
index 4c78ab3..c8e69ed 100644
--- a/qcom/rmtfs/storage.c
+++ b/qcom/rmtfs/storage.c
@@ -203,13 +203,13 @@
} else {
n = MIN(nbyte, rmtfd->shadow_len - offset);
if (n > 0)
- memcpy(buf, rmtfd->shadow_buf + offset, n);
+ memcpy(buf, (char*)rmtfd->shadow_buf + offset, n);
else
n = 0;
}
if (n < nbyte)
- memset(buf + n, 0, nbyte - n);
+ memset((char*)buf + n, 0, nbyte - n);
return nbyte;
}
@@ -239,7 +239,7 @@
rmtfd->shadow_len = new_len;
}
- memcpy(rmtfd->shadow_buf + offset, buf, nbyte);
+ memcpy((char*)rmtfd->shadow_buf + offset, buf, nbyte);
return nbyte;
}