From: asterix Date: Mon, 26 May 2008 09:15:07 +0000 (+0000) Subject: Cast some variable to corret size type. X-Git-Tag: 2.0.0~584 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=e3467ccc87640e20dfe5b0b45c11cc06858d2392;p=bertos.git Cast some variable to corret size type. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1350 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/drv/flash25.c b/bertos/drv/flash25.c index 1bb50fc8..a36bbb38 100644 --- a/bertos/drv/flash25.c +++ b/bertos/drv/flash25.c @@ -181,7 +181,7 @@ static size_t flash25_read(struct KFile *_fd, void *buf, size_t size) KFileFlash25 *fd = KFILEFLASH25(_fd); ASSERT(fd->fd.seek_pos + size <= fd->fd.size); - size = MIN((uint32_t)size, fd->fd.size - fd->fd.seek_pos); + size = MIN((kfile_size_t)size, fd->fd.size - fd->fd.seek_pos); //kprintf("Reading at addr[%lu], size[%d]\n", fd->seek_pos, size); CS_ENABLE(); @@ -235,7 +235,7 @@ static size_t flash25_write(struct KFile *_fd, const void *_buf, size_t size) ASSERT(fd->fd.seek_pos + size <= fd->fd.size); - size = MIN((flash25Size_t)size, fd->fd.size - fd->fd.seek_pos); + size = MIN((kfile_size_t)size, fd->fd.size - fd->fd.seek_pos); while (size) {