Eliminate variable shadowing warnings with MSVC (#17)
This commit is contained in:
parent
7f9a0c3c38
commit
858796a029
5 changed files with 16 additions and 7 deletions
|
@ -26,7 +26,16 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules)
|
||||||
|
|
||||||
# Compiler flags
|
# Compiler flags
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
add_compile_options(/W3 /MP /Zi /Zo /EHsc /WX)
|
add_compile_options(/W3
|
||||||
|
/w34456 # Declaration of 'var' hides previous local declaration
|
||||||
|
/w34457 # Declaration of 'var' hides function parameter
|
||||||
|
/w34458 # Declaration of 'var' hides class member
|
||||||
|
/w34459 # Declaration of 'var' hides global definition
|
||||||
|
/MP
|
||||||
|
/Zi
|
||||||
|
/Zo
|
||||||
|
/EHsc
|
||||||
|
/WX)
|
||||||
add_compile_options(/DNOMINMAX)
|
add_compile_options(/DNOMINMAX)
|
||||||
else()
|
else()
|
||||||
add_compile_options(-Wall
|
add_compile_options(-Wall
|
||||||
|
|
|
@ -227,9 +227,9 @@ void BlockOfCode::nop(size_t size) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BlockOfCode::SetCodePtr(CodePtr ptr) {
|
void BlockOfCode::SetCodePtr(CodePtr code_ptr) {
|
||||||
// The "size" defines where top_, the insertion point, is.
|
// The "size" defines where top_, the insertion point, is.
|
||||||
size_t required_size = reinterpret_cast<const u8*>(ptr) - getCode();
|
size_t required_size = reinterpret_cast<const u8*>(code_ptr) - getCode();
|
||||||
setSize(required_size);
|
setSize(required_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ public:
|
||||||
void int3() { db(0xCC); }
|
void int3() { db(0xCC); }
|
||||||
void nop(size_t size = 1);
|
void nop(size_t size = 1);
|
||||||
|
|
||||||
void SetCodePtr(CodePtr ptr);
|
void SetCodePtr(CodePtr code_ptr);
|
||||||
void EnsurePatchLocationSize(CodePtr begin, size_t size);
|
void EnsurePatchLocationSize(CodePtr begin, size_t size);
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
|
@ -46,8 +46,8 @@ Arm::LocationDescriptor Block::ConditionFailedLocation() const {
|
||||||
return cond_failed.get();
|
return cond_failed.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Block::SetConditionFailedLocation(Arm::LocationDescriptor location) {
|
void Block::SetConditionFailedLocation(Arm::LocationDescriptor fail_location) {
|
||||||
cond_failed = location;
|
cond_failed = fail_location;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t& Block::ConditionFailedCycleCount() {
|
size_t& Block::ConditionFailedCycleCount() {
|
||||||
|
|
|
@ -87,7 +87,7 @@ public:
|
||||||
/// Gets the location of the block to execute if the predicated condition fails.
|
/// Gets the location of the block to execute if the predicated condition fails.
|
||||||
Arm::LocationDescriptor ConditionFailedLocation() const;
|
Arm::LocationDescriptor ConditionFailedLocation() const;
|
||||||
/// Sets the location of the block to execute if the predicated condition fails.
|
/// Sets the location of the block to execute if the predicated condition fails.
|
||||||
void SetConditionFailedLocation(Arm::LocationDescriptor location);
|
void SetConditionFailedLocation(Arm::LocationDescriptor fail_location);
|
||||||
/// Determines whether or not a prediated condition failure block is present.
|
/// Determines whether or not a prediated condition failure block is present.
|
||||||
bool HasConditionFailedLocation() const;
|
bool HasConditionFailedLocation() const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue