From 34095954298315121af602c079ca784329d53b12 Mon Sep 17 00:00:00 2001 From: asterix Date: Wed, 11 Jun 2008 17:15:50 +0000 Subject: [PATCH] Cast to correct type for comparison. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1446 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/drv/dataflash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bertos/drv/dataflash.c b/bertos/drv/dataflash.c index c8af4265..cad2c610 100644 --- a/bertos/drv/dataflash.c +++ b/bertos/drv/dataflash.c @@ -351,7 +351,7 @@ static size_t dataflash_read(struct KFile *_fd, void *buf, size_t size) uint8_t *data = (uint8_t *)buf; - ASSERT(fd->fd.seek_pos + size <= fd->fd.size); + ASSERT(fd->fd.seek_pos + size <= (kfile_off_t)fd->fd.size); size = MIN((kfile_size_t)size, fd->fd.size - fd->fd.seek_pos); LOG_INFO("Reading at pos[%lu]\n", fd->fd.seek_pos); @@ -402,7 +402,7 @@ static size_t dataflash_write(struct KFile *_fd, const void *_buf, size_t size) const uint8_t *data = (const uint8_t *) _buf; - ASSERT(fd->fd.seek_pos + size <= fd->fd.size); + ASSERT(fd->fd.seek_pos + size <= (kfile_off_t)fd->fd.size); size = MIN((kfile_size_t)size, fd->fd.size - fd->fd.seek_pos); LOG_INFO("Writing at pos[%lu]\n", fd->fd.seek_pos); -- 2.25.1