diff options
author | cushon <cushon@google.com> | 2018-03-29 13:31:46 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-03-29 13:32:58 -0700 |
commit | a29da01b360b778d15ed735222d0f1d247954acf (patch) | |
tree | 2961500fb84e8aa2ac4342f3c97d530ef425a29c /third_party/ijar/zip.cc | |
parent | a76f7db51a90cc2e35c1d66782056c310729eef0 (diff) |
Fix a warning about comparing signed and unsigned values
PiperOrigin-RevId: 190977545
Diffstat (limited to 'third_party/ijar/zip.cc')
-rw-r--r-- | third_party/ijar/zip.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/third_party/ijar/zip.cc b/third_party/ijar/zip.cc index 9a719dbac3..93136e5b17 100644 --- a/third_party/ijar/zip.cc +++ b/third_party/ijar/zip.cc @@ -71,7 +71,7 @@ namespace devtools_ijar { // In the absence of ZIP64 support, zip files are limited to 4GB. // http://www.info-zip.org/FAQ.html#limits -static const u8 kMaximumOutputSize = std::numeric_limits<uint32_t>::max(); +static const size_t kMaximumOutputSize = std::numeric_limits<uint32_t>::max(); static const u4 kDefaultTimestamp = 30 << 25 | 1 << 21 | 1 << 16; // January 1, 2010 in DOS time @@ -199,11 +199,11 @@ class InputZipFile : public ZipExtractor { // class OutputZipFile : public ZipBuilder { public: - OutputZipFile(const char* filename, u8 estimated_size) : - output_file_(NULL), - filename_(filename), - estimated_size_(estimated_size), - finished_(false) { + OutputZipFile(const char *filename, size_t estimated_size) + : output_file_(NULL), + filename_(filename), + estimated_size_(estimated_size), + finished_(false) { errmsg[0] = 0; } @@ -257,7 +257,7 @@ class OutputZipFile : public ZipBuilder { MappedOutputFile* output_file_; const char* filename_; - u8 estimated_size_; + size_t estimated_size_; bool finished_; // OutputZipFile is responsible for maintaining the following @@ -1078,8 +1078,8 @@ int OutputZipFile::FinishFile(size_t filelength, bool compress, bool OutputZipFile::Open() { if (estimated_size_ > kMaximumOutputSize) { fprintf(stderr, - "Uncompressed input jar has size %llu, " - "which exceeds the maximum supported output size %llu.\n" + "Uncompressed input jar has size %lu, " + "which exceeds the maximum supported output size %lu.\n" "Assuming that ijar will be smaller and hoping for the best.\n", estimated_size_, kMaximumOutputSize); estimated_size_ = kMaximumOutputSize; @@ -1099,7 +1099,7 @@ bool OutputZipFile::Open() { return true; } -ZipBuilder* ZipBuilder::Create(const char* zip_file, u8 estimated_size) { +ZipBuilder *ZipBuilder::Create(const char *zip_file, size_t estimated_size) { OutputZipFile* result = new OutputZipFile(zip_file, estimated_size); if (!result->Open()) { fprintf(stderr, "%s\n", result->GetError()); |