Make the arm port build cleanly with Clang.

This fixes the following two warnings, so that "make all" builds cleanly
with Clang:

  src/arm/macro-assembler-arm.h:1410:7: error: private field
  'instructions_' is not used
        [-Werror,-Wunused-private-field]
          int instructions_;  // Number of instructions of the expected patch size.
              ^

  src/arm/simulator-arm.cc:402:20: error: variable 'words' is used uninitialized whenever 'if'
        condition is false [-Werror,-Wsometimes-uninitialized]
          } else if (argc == next_arg + 1) {
                     ^~~~~~~~~~~~~~~~~~~~
  ../src/arm/simulator-arm.cc:407:21: note: uninitialized use occurs here
          end = cur + words;
                      ^~~~~
  ../src/arm/simulator-arm.cc:402:16: note: remove the 'if' if its condition is always true
          } else if (argc == next_arg + 1) {
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~

Review URL: https://chromiumcodereview.appspot.com/12087131

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13583 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
ulan@chromium.org 2013-02-04 10:30:54 +00:00
parent 7282be179e
commit 23ee3f285a
3 changed files with 1 additions and 3 deletions

View File

@ -3952,7 +3952,6 @@ bool AreAliased(Register reg1,
CodePatcher::CodePatcher(byte* address, int instructions)
: address_(address),
instructions_(instructions),
size_(instructions * Assembler::kInstrSize),
masm_(NULL, address, size_ + Assembler::kGap) {
// Create a new macro assembler pointing to the address of the code to patch.

View File

@ -1407,7 +1407,6 @@ class CodePatcher {
private:
byte* address_; // The address of the code being patched.
int instructions_; // Number of instructions of the expected patch size.
int size_; // Number of bytes of the expected patch size.
MacroAssembler masm_; // Macro assembler used to generate the code.
};

View File

@ -399,7 +399,7 @@ void ArmDebugger::Debug() {
int32_t words;
if (argc == next_arg) {
words = 10;
} else if (argc == next_arg + 1) {
} else {
if (!GetValue(argv[next_arg], &words)) {
words = 10;
}