summaryrefslogtreecommitdiff
path: root/executor
diff options
context:
space:
mode:
authorMika Väinölä <mika.vainola@siru.fi>2019-04-09 16:28:45 +0300
committerAlexander Galazin <Alexander.Galazin@arm.com>2019-05-08 12:15:05 -0400
commit31dd7a0b3c38181ebdaf10bdc95f8c591734c342 (patch)
tree48bfaf4c94ade314c6222f2560d8aca5bf030246 /executor
parent5f3c4318fb9ff29428d25661f2661364233a6c99 (diff)
downloadVK-GL-CTS-31dd7a0b3c38181ebdaf10bdc95f8c591734c342.tar.gz
VK-GL-CTS-31dd7a0b3c38181ebdaf10bdc95f8c591734c342.tar.bz2
VK-GL-CTS-31dd7a0b3c38181ebdaf10bdc95f8c591734c342.zip
Fix Clang 8 and GCC 9 warnings
Rename some TYPE_LAST and STATE_LAST enums that produce variable shadowing warnings with Clang 8. Reimplement tcu::Format::Hex methods using stringstream and IO manipulators instead of format strings and add a cast to deUint32 to fix warnings on GCC 9. Component: Framework VK-GL-CTS issue: 1631 Change-Id: Ide4b25c106810b725c5ed7caaaf676f02e81b368
Diffstat (limited to 'executor')
-rw-r--r--executor/tools/xeExtractValues.cpp2
-rw-r--r--executor/xeTestCaseResult.cpp6
-rw-r--r--executor/xeTestCaseResult.hpp18
3 files changed, 13 insertions, 13 deletions
diff --git a/executor/tools/xeExtractValues.cpp b/executor/tools/xeExtractValues.cpp
index 64a8689d7..5949824a2 100644
--- a/executor/tools/xeExtractValues.cpp
+++ b/executor/tools/xeExtractValues.cpp
@@ -110,7 +110,7 @@ static Value findValueByTag (const xe::ri::List& items, const string& tagName)
if (item.getType() == xe::ri::TYPE_SECTION)
{
const Value value = findValueByTag(static_cast<const xe::ri::Section&>(item).items, tagName);
- if (value.getType() != Value::TYPE_EMPTY)
+ if (value.getType() != Value::NUMVALTYPE_EMPTY)
return value;
}
else if (item.getType() == xe::ri::TYPE_NUMBER)
diff --git a/executor/xeTestCaseResult.cpp b/executor/xeTestCaseResult.cpp
index f007603a2..5e56fa4f0 100644
--- a/executor/xeTestCaseResult.cpp
+++ b/executor/xeTestCaseResult.cpp
@@ -71,14 +71,14 @@ std::ostream& operator<< (std::ostream& str, const NumericValue& value)
{
switch (value.getType())
{
- case NumericValue::TYPE_FLOAT64:
+ case NumericValue::NUMVALTYPE_FLOAT64:
return str << std::setprecision(std::numeric_limits<double>::digits10 + 2) << value.getFloat64();
- case NumericValue::TYPE_INT64:
+ case NumericValue::NUMVALTYPE_INT64:
return str << value.getInt64();
default:
- DE_ASSERT(value.getType() == NumericValue::TYPE_EMPTY);
+ DE_ASSERT(value.getType() == NumericValue::NUMVALTYPE_EMPTY);
return str;
}
}
diff --git a/executor/xeTestCaseResult.hpp b/executor/xeTestCaseResult.hpp
index 11d68ce8e..eef92d79d 100644
--- a/executor/xeTestCaseResult.hpp
+++ b/executor/xeTestCaseResult.hpp
@@ -163,20 +163,20 @@ class NumericValue
public:
enum Type
{
- TYPE_EMPTY = 0,
- TYPE_INT64,
- TYPE_FLOAT64,
+ NUMVALTYPE_EMPTY = 0,
+ NUMVALTYPE_INT64,
+ NUMVALTYPE_FLOAT64,
- TYPE_LAST
+ NUMVALTYPE_LAST
};
- NumericValue (void) : m_type(TYPE_EMPTY) {}
- NumericValue (deInt64 value) : m_type(TYPE_INT64) { m_value.int64 = value; }
- NumericValue (double value) : m_type(TYPE_FLOAT64) { m_value.float64 = value; }
+ NumericValue (void) : m_type(NUMVALTYPE_EMPTY) {}
+ NumericValue (deInt64 value) : m_type(NUMVALTYPE_INT64) { m_value.int64 = value; }
+ NumericValue (double value) : m_type(NUMVALTYPE_FLOAT64) { m_value.float64 = value; }
Type getType (void) const { return m_type; }
- deInt64 getInt64 (void) const { DE_ASSERT(getType() == TYPE_INT64); return m_value.int64; }
- double getFloat64 (void) const { DE_ASSERT(getType() == TYPE_FLOAT64); return m_value.float64; }
+ deInt64 getInt64 (void) const { DE_ASSERT(getType() == NUMVALTYPE_INT64); return m_value.int64; }
+ double getFloat64 (void) const { DE_ASSERT(getType() == NUMVALTYPE_FLOAT64); return m_value.float64; }
private:
Type m_type;