Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(524)

Unified Diff: src/mksnapshot.cc

Issue 8825003: Fix GCC 4.7 warnings, which are related to char being signed in GCC (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Fix GCC 4.7 warnings, which are related to char being signed in GCC Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/cctest/test-regexp.cc » ('j') | test/cctest/test-regexp.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mksnapshot.cc
===================================================================
--- src/mksnapshot.cc (revision 10237)
+++ src/mksnapshot.cc (working copy)
@@ -87,8 +87,8 @@
class Compressor {
public:
virtual ~Compressor() {}
- virtual bool Compress(i::Vector<char> input) = 0;
- virtual i::Vector<char>* output() = 0;
+ virtual bool Compress(i::Vector<unsigned char> input) = 0;
+ virtual i::Vector<unsigned char>* output() = 0;
};
@@ -112,7 +112,7 @@
fprintf(fp, "%d", at(j));
Vyacheslav Egorov (Chromium) 2011/12/12 18:06:17 Instead of using unsigned char you can probably ju
Tobias Burnus 2011/12/12 21:54:00 I agree that the patch will be shorter. I am not s
}
}
- char at(int i) { return data_[i]; }
+ unsigned char at(int i) { return data_[i]; }
bool Compress(Compressor* compressor) {
ASSERT_EQ(-1, raw_size_);
raw_size_ = data_.length();
@@ -124,7 +124,7 @@
int raw_size() { return raw_size_; }
private:
- i::List<char> data_;
+ i::List<unsigned char> data_;
int raw_size_;
};
@@ -232,9 +232,10 @@
virtual ~BZip2Compressor() {
delete output_;
}
- virtual bool Compress(i::Vector<char> input) {
+ virtual bool Compress(i::Vector<unsigned char> input) {
delete output_;
- output_ = new i::ScopedVector<char>((input.length() * 101) / 100 + 1000);
+ output_ = new i::ScopedVector<unsigned char>((input.length() * 101) / 100
Vyacheslav Egorov (Chromium) 2011/12/12 18:06:17 Usually we are leaving operation on the previous l
+ + 1000);
unsigned int output_length_ = output_->length();
int result = BZ2_bzBuffToBuffCompress(output_->start(), &output_length_,
input.start(), input.length(),
@@ -247,10 +248,10 @@
return false;
}
}
- virtual i::Vector<char>* output() { return output_; }
+ virtual i::Vector<unsigned char>* output() { return output_; }
private:
- i::ScopedVector<char>* output_;
+ i::ScopedVector<unsigned char>* output_;
};
@@ -259,7 +260,7 @@
virtual ~BZip2Decompressor() { }
protected:
- virtual int DecompressData(char* raw_data,
+ virtual int DecompressData(unsigned char* raw_data,
int* raw_data_size,
const char* compressed_data,
int compressed_data_size) {
@@ -269,7 +270,7 @@
int result =
BZ2_bzBuffToBuffDecompress(raw_data,
&decompressed_size,
- const_cast<char*>(compressed_data),
+ const_cast<unsigned char*>(compressed_data),
compressed_data_size,
0, 1);
if (result == BZ_OK) {
« no previous file with comments | « no previous file | test/cctest/test-regexp.cc » ('j') | test/cctest/test-regexp.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698