From 90799b8b250623464b9fafb5c49bebd02d23bb61 Mon Sep 17 00:00:00 2001 From: batt Date: Fri, 1 May 2009 12:33:39 +0000 Subject: [PATCH] Avoid warning using void * arithmetic. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2686 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/struct/kfile_fifo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bertos/struct/kfile_fifo.c b/bertos/struct/kfile_fifo.c index d09ae1e7..9ebc59df 100644 --- a/bertos/struct/kfile_fifo.c +++ b/bertos/struct/kfile_fifo.c @@ -51,7 +51,7 @@ static size_t kfilefifo_read(struct KFile *_fd, void *_buf, size_t size) while (size-- && !fifo_isempty_locked(fd->fifo)) *buf++ = fifo_pop_locked(fd->fifo); - return (void *)buf - _buf; + return buf - (uint8_t *)_buf; } static size_t kfilefifo_write(struct KFile *_fd, const void *_buf, size_t size) @@ -62,7 +62,7 @@ static size_t kfilefifo_write(struct KFile *_fd, const void *_buf, size_t size) while (size-- && !fifo_isfull_locked(fd->fifo)) fifo_push_locked(fd->fifo, *buf++); - return (void *)buf - _buf; + return buf - (const uint8_t *)_buf; } void kfilefifo_init(KFileFifo *kf, FIFOBuffer *fifo) -- 2.25.1