Frameworks/base: Fix two warnings in cmds

Change-Id: Ifb9c7fb7a2d28c13010ddc186bea5f5f0daefb4a
This commit is contained in:
Andreas Gampe
2014-11-07 16:28:19 -08:00
parent 487ae9b8dc
commit ebee1379ea
3 changed files with 3 additions and 5 deletions

View File

@@ -75,7 +75,7 @@ static int perform_list(const char* filename)
size_t dataSize;
err = reader.ReadEntityHeader(&key, &dataSize);
if (err == 0) {
printf(" entity: %s (%d bytes)\n", key.string(), dataSize);
printf(" entity: %s (%zu bytes)\n", key.string(), dataSize);
} else {
printf(" Error reading entity header\n");
}

View File

@@ -78,7 +78,7 @@ fail:
if (fstat(idmap_fd, &st) == -1) {
return true;
}
if (st.st_size < N) {
if (st.st_size < static_cast<off_t>(N)) {
// file is empty or corrupt
return true;
}

View File

@@ -1773,9 +1773,7 @@ public:
const char* targetPath, const char* overlayPath,
void** outData, size_t* outSize) const;
enum {
IDMAP_HEADER_SIZE_BYTES = 4 * sizeof(uint32_t) + 2 * 256,
};
static const size_t IDMAP_HEADER_SIZE_BYTES = 4 * sizeof(uint32_t) + 2 * 256;
// Retrieve idmap meta-data.
//