From: David Neto Date: Wed, 6 Jan 2016 19:43:55 +0000 (-0500) Subject: Fix shadowing warnings reported by GCC X-Git-Tag: upstream/2018.6~1386 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ae7d707fdb913759fd08ac19c39b358c43049a12;p=platform%2Fupstream%2FSPIRV-Tools.git Fix shadowing warnings reported by GCC --- diff --git a/include/util/hex_float.h b/include/util/hex_float.h index 3ad2039..5be792d 100644 --- a/include/util/hex_float.h +++ b/include/util/hex_float.h @@ -375,9 +375,9 @@ class HexFloat { } } - uint_type value = 0; + uint_type new_value = 0; if (negative) { - value |= sign_mask; + new_value |= sign_mask; } exponent += exponent_bias; assert(exponent >= 0); @@ -385,8 +385,8 @@ class HexFloat { // put it all together exponent = (exponent << exponent_left_shift) & exponent_mask; significand &= fraction_encode_mask; - value |= exponent | significand; - value_ = BitwiseCast(value); + new_value |= exponent | significand; + value_ = BitwiseCast(new_value); } // Increments the significand of this number by the given amount. diff --git a/source/text_handler.h b/source/text_handler.h index 1211eb4..3e1a341 100644 --- a/source/text_handler.h +++ b/source/text_handler.h @@ -128,9 +128,9 @@ class ClampToZeroIfUnsignedType< // Encapsulates the data used during the assembly of a SPIR-V module. class AssemblyContext { public: - AssemblyContext(spv_text text, spv_diagnostic* diagnostic) + AssemblyContext(spv_text text, spv_diagnostic* diagnostic_arg) : current_position_({}), - pDiagnostic_(diagnostic), + pDiagnostic_(diagnostic_arg), text_(text), bound_(1) {} diff --git a/source/validate_types.cpp b/source/validate_types.cpp index 5690607..b025287 100644 --- a/source/validate_types.cpp +++ b/source/validate_types.cpp @@ -115,8 +115,9 @@ const vector>& GetModuleOrder() { namespace libspirv { -ValidationState_t::ValidationState_t(spv_diagnostic* diag, uint32_t options) - : diagnostic_(diag), +ValidationState_t::ValidationState_t(spv_diagnostic* diagnostic, + uint32_t options) + : diagnostic_(diagnostic), instruction_counter_(0), defined_ids_{}, unresolved_forward_ids_{},