Silent warning when we compile without debug.
[bertos.git] / bertos / cpu / cortex-m3 / drv / flash_lm3s.c
index 730fbaf4ba424372c049668f29f9e19cd31a48bf..7ca0a7cf33b126e3b8577f31e26a3e088a2be6d0 100644 (file)
@@ -111,15 +111,13 @@ static int lm3s_writeWord(struct KBlock *blk, uint32_t addr, uint32_t data)
 
 static size_t lm3s_flash_readDirect(struct KBlock *blk, block_idx_t idx, void *buf, size_t offset, size_t size)
 {
-       ASSERT(offset == 0);
-       ASSERT(size == blk->blk_size);
-
-       memcpy(buf, (void *)(idx * blk->blk_size), size);
+       memcpy(buf, (void *)(idx * blk->blk_size + offset), size);
        return size;
 }
 
 static size_t lm3s_flash_writeDirect(struct KBlock *blk, block_idx_t idx, const void *_buf, size_t offset, size_t size)
 {
+       (void)offset;
        ASSERT(offset == 0);
        ASSERT(size == blk->blk_size);