diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2015-03-25 18:14:11 +0100 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2015-03-26 00:27:51 +0100 |
commit | 32c2a3bc5a6b0afe26812b5bf255f43790ef979d (patch) | |
tree | 2d591e6a79c082c610e0d4c8c5d10491808fd7c8 /src/jit/rangecheck.cpp | |
parent | 04aed1266c4419667b1348426ce59f843449cfdb (diff) | |
download | coreclr-32c2a3bc5a6b0afe26812b5bf255f43790ef979d.tar.gz coreclr-32c2a3bc5a6b0afe26812b5bf255f43790ef979d.tar.bz2 coreclr-32c2a3bc5a6b0afe26812b5bf255f43790ef979d.zip |
Fix warnings in the jitter code
This change fixes some of the warnings in the jitter code on Linux. With this change
combined with an upcoming change in the rest of the codebase, 16 warning disabling
options can be removed.
The issues in the jitter were:
1) Incorrect typedefs for const_reference and const_pointer (the const was ignored)
2) Member initiazalization order in class constructor didn't correspond to the member order in some classes
3) Objects with vtables were copied via memcpy. While this is intentional, cast of the pointers to void*
is required to silence clang warning
4) Comparing values of different enums - there are cases of two enums containing the same values.
5) Casting int to pointer - the cast was legal (forming a handle), adding cast to size_t in between used to fix the warning
6) "static struct" - removed the static keyword
7) Missing return value in methods with _ASSERTE
8) Class name classifier on methods in the .h
9) Specialized template member functions need to be defined out of the class
Diffstat (limited to 'src/jit/rangecheck.cpp')
-rw-r--r-- | src/jit/rangecheck.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/jit/rangecheck.cpp b/src/jit/rangecheck.cpp index 573b7eeb87..f6b452686f 100644 --- a/src/jit/rangecheck.cpp +++ b/src/jit/rangecheck.cpp @@ -16,11 +16,11 @@ static const int MAX_VISIT_BUDGET = 8192; // RangeCheck constructor. RangeCheck::RangeCheck(Compiler* pCompiler) - : m_pCompiler(pCompiler) - , m_pDefTable(nullptr) + : m_pOverflowMap(nullptr) , m_pRangeMap(nullptr) - , m_pOverflowMap(nullptr) , m_fMappedDefs(false) + , m_pDefTable(nullptr) + , m_pCompiler(pCompiler) , m_nVisitBudget(MAX_VISIT_BUDGET) { } @@ -1020,8 +1020,8 @@ struct Node Range range; Node* next; Node() - : next(NULL) - , range(Limit(Limit::keUndef)) {} + : range(Limit(Limit::keUndef)), + next(NULL) {} }; // Compute the range recursively by asking for the range of each variable in the dependency chain. |