am f89a2fda: Merge "Frameworks/base: Fix two warnings in cmds"

* commit 'f89a2fdacb2ba907f180188dc79f9de81e3eb254':
  Frameworks/base: Fix two warnings in cmds
This commit is contained in:
Andreas Gampe
2014-11-08 02:04:43 +00:00
committed by Android Git Automerger
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

@@ -1793,9 +1793,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.
//