libc_block: enable and fix warnings

This commit is contained in:
Christian Helmuth 2013-12-09 10:26:12 +01:00 committed by Norman Feske
parent 05ad5a6ad4
commit 50c30b1702
2 changed files with 3 additions and 5 deletions

View File

@ -4,6 +4,4 @@ SRC_CC = plugin.cc
vpath %.cc $(REP_DIR)/src/lib/libc_block
include $(REP_DIR)/lib/mk/libc-common.inc
SHARED_LIB = yes

View File

@ -415,7 +415,7 @@ namespace {
" displacement:%zu", ctx->seek_offset(), blk_size, displ);
nbytes = ctx->block_io(blk_nr, blk_buffer, blk_size, false);
if (nbytes != blk_size) {
if ((unsigned)nbytes != blk_size) {
PERR("error while reading block:%zu from block device",
blk_nr);
return -1;
@ -465,7 +465,7 @@ namespace {
while (count > 0) {
size_t displ = 0;
size_t length = 0;
size_t nbytes = 0;
ssize_t nbytes = 0;
size_t blk_nr = ctx->seek_offset() / blk_size;
displ = ctx->seek_offset() % blk_size;
@ -520,7 +520,7 @@ namespace {
Genode::memcpy(blk_buffer + displ, _buf + written, length);
nbytes = ctx->block_io(blk_nr, blk_buffer, blk_size, true);
if (nbytes != blk_size) {
if ((unsigned)nbytes != blk_size) {
PERR("error while reading block:%zu from Block_device",
blk_nr);
return -1;