diff options
Diffstat (limited to '')
-rw-r--r-- | minzip/inline_magic.h | 2 | ||||
-rw-r--r-- | mtdutils/mtdutils.c | 8 | ||||
-rw-r--r-- | tools/ota/check-lost+found.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/minzip/inline_magic.h b/minzip/inline_magic.h index 8c185e155..59c659f77 100644 --- a/minzip/inline_magic.h +++ b/minzip/inline_magic.h @@ -18,7 +18,7 @@ #define MINZIP_INLINE_MAGIC_H_ #ifndef MINZIP_GENERATE_INLINES -#define INLINE extern __inline__ +#define INLINE extern inline __attribute((__gnu_inline__)) #else #define INLINE #endif diff --git a/mtdutils/mtdutils.c b/mtdutils/mtdutils.c index e4d2a6064..107cbb9a8 100644 --- a/mtdutils/mtdutils.c +++ b/mtdutils/mtdutils.c @@ -328,8 +328,8 @@ static int read_block(const MtdPartition *partition, int fd, char *data) ssize_t mtd_read_data(MtdReadContext *ctx, char *data, size_t len) { - ssize_t read = 0; - while (read < (int) len) { + size_t read = 0; + while (read < len) { if (ctx->consumed < ctx->partition->erase_size) { size_t avail = ctx->partition->erase_size - ctx->consumed; size_t copy = len - read < avail ? len - read : avail; @@ -350,7 +350,7 @@ ssize_t mtd_read_data(MtdReadContext *ctx, char *data, size_t len) } // Read the next block into the buffer - if (ctx->consumed == ctx->partition->erase_size && read < (int) len) { + if (ctx->consumed == ctx->partition->erase_size && read < len) { if (read_block(ctx->partition, ctx->fd, ctx->buffer)) return -1; ctx->consumed = 0; } @@ -457,7 +457,7 @@ static int write_block(MtdWriteContext *ctx, const char *data) if (retry > 0) { fprintf(stderr, "mtd: wrote block after %d retries\n", retry); } - fprintf(stderr, "mtd: successfully wrote block at %llx\n", pos); + fprintf(stderr, "mtd: successfully wrote block at %lx\n", pos); return 0; // Success! } diff --git a/tools/ota/check-lost+found.c b/tools/ota/check-lost+found.c index f85627544..da02f4602 100644 --- a/tools/ota/check-lost+found.c +++ b/tools/ota/check-lost+found.c @@ -44,7 +44,7 @@ static const char *kPartitions[] = { "/system", "/data", "/cache", NULL }; * 2. Write a log entry with the number of files in lost+found directories. */ -int main(int argc, char **argv) { +int main(int argc __attribute__((unused)), char **argv __attribute__((unused))) { mkdir(kOutputDir, 0755); chown(kOutputDir, AID_SYSTEM, AID_SYSTEM); FILE *out = fopen(kOutputFile, "a"); |