summaryrefslogtreecommitdiff
path: root/tests/ubi-tests/integ.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-01-16 20:53:42 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-01-16 20:53:42 +0200
commitf6bd2c366b32262c2a5a1ac38713dc84bf7c9cbf (patch)
tree6464f369218560de977847b1dafc2952f89e37d9 /tests/ubi-tests/integ.c
parent3bcddc65e3ffd69f29a68410c0604218cec8c34a (diff)
ubi-tests: fix build and some warnings
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'tests/ubi-tests/integ.c')
-rw-r--r--tests/ubi-tests/integ.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/ubi-tests/integ.c b/tests/ubi-tests/integ.c
index f78c280..9958466 100644
--- a/tests/ubi-tests/integ.c
+++ b/tests/ubi-tests/integ.c
@@ -81,7 +81,7 @@ static uint64_t total_written = 0;
static uint64_t total_space = 0;
static struct open_volume_fd *open_volumes;
-static size_t open_volume_count = 0;
+static int open_volume_count = 0;
static const char *ubi_module_load_string;
@@ -237,7 +237,7 @@ static void check_erase_block(struct erase_block_info *erase_block, int fd)
if (w->offset + w->size < gap_end) {
/* There is a gap. Check all 0xff */
off64_t gap_start = w->offset + w->size;
- size_t size = gap_end - gap_start;
+ ssize_t size = gap_end - gap_start;
if (lseek64(fd, gap_start, SEEK_SET) != gap_start)
error_exit("lseek64 failed");
memset(read_buffer, 0 , size);
@@ -273,7 +273,7 @@ static void check_erase_block(struct erase_block_info *erase_block, int fd)
if (gap_end > erase_block->offset) {
/* Check all 0xff */
off64_t gap_start = erase_block->offset;
- size_t size = gap_end - gap_start;
+ ssize_t size = gap_end - gap_start;
if (lseek64(fd, gap_start, SEEK_SET) != gap_start)
error_exit("lseek64 failed");
memset(read_buffer, 0 , size);
@@ -535,7 +535,7 @@ static void get_ubi_devices_info(void)
{
int i, ubi_pos = 0;
char dev_name[1024];
- size_t buf_size = 1024 * 128;
+ ssize_t buf_size = 1024 * 128;
if (ubi_get_info(libubi, &info))
error_exit("ubi_get_info failed");