diff options
Diffstat (limited to 'cmds/idmap/create.cpp')
-rw-r--r-- | cmds/idmap/create.cpp | 8 |
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; } |