summaryrefslogtreecommitdiff
path: root/cmds/idmap/create.cpp
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2014-11-07 22:35:32 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-11-07 22:35:32 +0000
commite80c01e8d124c69ca60fc8e7a0ca7001be3796e0 (patch)
tree00de5f6ee61e72713c3b141f5a308f33f312bf53 /cmds/idmap/create.cpp
parent59701b9ba5c453e327bc0e6873a9f6ff87a10391 (diff)
parentcfedceb8c180a2e176154d461659e0c3569dc931 (diff)
Merge "Frameworks/base: Turn on -Wall -Werror in cmds"
Diffstat (limited to 'cmds/idmap/create.cpp')
-rw-r--r--cmds/idmap/create.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmds/idmap/create.cpp b/cmds/idmap/create.cpp
index 593a1973669a..28da3d6d22eb 100644
--- a/cmds/idmap/create.cpp
+++ b/cmds/idmap/create.cpp
@@ -22,7 +22,7 @@ namespace {
if (entry == NULL) {
return -1;
}
- if (!zip->getEntryInfo(entry, NULL, NULL, NULL, NULL, NULL, (long*)crc)) {
+ if (!zip->getEntryInfo(entry, NULL, NULL, NULL, NULL, NULL, reinterpret_cast<long*>(crc))) {
return -1;
}
zip->releaseEntry(entry);
@@ -66,7 +66,7 @@ fail:
fprintf(stderr, "error: write: %s\n", strerror(errno));
return -1;
}
- bytesLeft -= w;
+ bytesLeft -= static_cast<size_t>(w);
}
return 0;
}
@@ -84,7 +84,7 @@ fail:
}
char buf[N];
- ssize_t bytesLeft = N;
+ size_t bytesLeft = N;
if (lseek(idmap_fd, SEEK_SET, 0) < 0) {
return true;
}
@@ -93,7 +93,7 @@ fail:
if (r < 0) {
return true;
}
- bytesLeft -= r;
+ bytesLeft -= static_cast<size_t>(r);
if (bytesLeft == 0) {
break;
}