From: batt Date: Fri, 1 May 2009 12:33:39 +0000 (+0000) Subject: Avoid warning using void * arithmetic. X-Git-Tag: 2.2.0~279 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=90799b8b250623464b9fafb5c49bebd02d23bb61;p=bertos.git Avoid warning using void * arithmetic. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2686 38d2e660-2303-0410-9eaa-f027e97ec537 --- 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)