From 30ff891643f59b2fc5effd1c7ca7fa7816138d9d Mon Sep 17 00:00:00 2001 From: asterix Date: Tue, 10 Jun 2008 17:35:11 +0000 Subject: [PATCH] Fix type warning. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1438 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/drv/flash25.c | 6 +++--- bertos/drv/stepper.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bertos/drv/flash25.c b/bertos/drv/flash25.c index 25d9ac61..9dbcc49e 100644 --- a/bertos/drv/flash25.c +++ b/bertos/drv/flash25.c @@ -59,7 +59,7 @@ #include #endif -#warning this file was change, but is untest! +#warning FIXME:This file was change, but is untest! /** * Wait until flash memory is ready. @@ -178,7 +178,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); + ASSERT(fd->fd.seek_pos + (kfile_size_t)size <= fd->fd.size); 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); @@ -231,7 +231,7 @@ static size_t flash25_write(struct KFile *_fd, const void *_buf, size_t size) KFileFlash25 *fd = KFILEFLASH25(_fd); - ASSERT(fd->fd.seek_pos + size <= fd->fd.size); + ASSERT(fd->fd.seek_pos + (kfile_size_t)size <= fd->fd.size); size = MIN((kfile_size_t)size, fd->fd.size - fd->fd.seek_pos); diff --git a/bertos/drv/stepper.c b/bertos/drv/stepper.c index 57ac7fc4..21667866 100644 --- a/bertos/drv/stepper.c +++ b/bertos/drv/stepper.c @@ -313,7 +313,7 @@ static enum StepperState FAST_FUNC FSM_run(struct Stepper *motor) //motor->rampValue = 0; //motor->rampClock = motor->rampValue = motor->ramp->clocksMaxWL; - else if (distance <= motor->rampStep) + else if (distance <= (uint16_t)motor->rampStep) stepper_decel(motor); // check whether the velocity must be changed -- 2.25.1