diff options
author | sra@google.com <sra@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-18 03:28:40 +0000 |
---|---|---|
committer | sra@google.com <sra@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-18 03:28:40 +0000 |
commit | 54f1b829fe53c48b82440e7c8482e2b6ca397995 (patch) | |
tree | 5600358a8d8fac77ea4a7730fca9c4b6cbe09108 /courgette/assembly_program.cc | |
parent | 4efe77c3fd39df0dc03b0d73ca0ba24c6e66ff28 (diff) | |
download | chromium_src-54f1b829fe53c48b82440e7c8482e2b6ca397995.zip chromium_src-54f1b829fe53c48b82440e7c8482e2b6ca397995.tar.gz chromium_src-54f1b829fe53c48b82440e7c8482e2b6ca397995.tar.bz2 |
Code changes to get the code to compile under GCC.
Courgette still only knows how to compress Windows x86 executables.
But now you can compress them on linux.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/149597
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21042 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'courgette/assembly_program.cc')
-rw-r--r-- | courgette/assembly_program.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/courgette/assembly_program.cc b/courgette/assembly_program.cc index e40f38f..a0575a1 100644 --- a/courgette/assembly_program.cc +++ b/courgette/assembly_program.cc @@ -85,8 +85,8 @@ class InstructionWithLabel : public Instruction { } // namespace AssemblyProgram::AssemblyProgram() - : image_base_(0), - byte_instruction_cache_(NULL) { + : byte_instruction_cache_(NULL), + image_base_(0) { } static void DeleteContainedLabels(const RVAToLabel& labels) { @@ -209,9 +209,9 @@ void AssemblyProgram::AssignRemainingIndexes(RVAToLabel* labels) { int used = 0; for (RVAToLabel::iterator p = labels->begin(); p != labels->end(); ++p) { - size_t index = p->second->index_; + int index = p->second->index_; if (index != Label::kNoIndex) { - while (index >= available.size()) + while (static_cast<size_t>(index) >= available.size()) available.push_back(true); available.at(index) = false; ++used; @@ -244,7 +244,6 @@ void AssemblyProgram::AssignRemainingIndexes(RVAToLabel* labels) { // label? // int fill_backward_count = 0; - int backward_refs = 0; prev = 0; for (RVAToLabel::reverse_iterator p = labels->rbegin(); p != labels->rend(); |