From 9c426a0e423177adc591eb7bd43a2d07b49ed39f Mon Sep 17 00:00:00 2001 From: asterix Date: Tue, 31 Aug 2010 09:31:20 +0000 Subject: [PATCH] Silent some warning. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4211 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/io/kblock_posix.c | 3 +-- bertos/struct/bitarray.h | 2 +- bertos/struct/bitarray_test.c | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/bertos/io/kblock_posix.c b/bertos/io/kblock_posix.c index b1186ff2..eefea0d1 100644 --- a/bertos/io/kblock_posix.c +++ b/bertos/io/kblock_posix.c @@ -95,11 +95,10 @@ static int kblockposix_error(struct KBlock *b) } -static int kblockposix_claererr(struct KBlock *b) +static void kblockposix_claererr(struct KBlock *b) { KBlockPosix *f = KBLOCKPOSIX_CAST(b); clearerr(f->fp); - return 0; } diff --git a/bertos/struct/bitarray.h b/bertos/struct/bitarray.h index 8fbef32c..805b9445 100644 --- a/bertos/struct/bitarray.h +++ b/bertos/struct/bitarray.h @@ -105,7 +105,7 @@ INLINE void bitarray_dump(BitArray *ctx) kprintf("%d", bitarray_check(ctx, i++)); if (j == 7) { - kprintf("..%02x [%d] %d\n", ctx->array[i / 8], len, i); + kprintf("..%02x [%zu]\n", ctx->array[i / 8], len); j = 0; continue; } diff --git a/bertos/struct/bitarray_test.c b/bertos/struct/bitarray_test.c index dde22981..81bcd8ab 100644 --- a/bertos/struct/bitarray_test.c +++ b/bertos/struct/bitarray_test.c @@ -58,7 +58,7 @@ int bitarray_testRun(void) memset(test1, 0xaa, sizeof(test1)); bitarray_dump(&ctx); - for (int i = 0; i < bitarray_size(&ctx); i++) + for (size_t i = 0; i < bitarray_size(&ctx); i++) { if (!((bool)(i % 2) == bitarray_check(&ctx, i))) { @@ -68,7 +68,7 @@ int bitarray_testRun(void) } memset(test1, 0, sizeof(test1)); - for (int i = 0; i < bitarray_size(&ctx); i++) + for (size_t i = 0; i < bitarray_size(&ctx); i++) { if ((i % 2) == 0) bitarray_clear(&ctx, i); @@ -77,7 +77,7 @@ int bitarray_testRun(void) } bitarray_dump(&ctx); - for (int i = 0; i < bitarray_size(&ctx); i++) + for (size_t i = 0; i < bitarray_size(&ctx); i++) { if (!((bool)(i % 2) == bitarray_check(&ctx, i))) { -- 2.25.1