diff options
| author | Yong He <yonghe@outlook.com> | 2017-11-04 18:45:42 -0400 |
|---|---|---|
| committer | Yong He <yonghe@outlook.com> | 2017-11-04 18:45:42 -0400 |
| commit | 8c0a429c292ea6735ce1ac14c22125266e8fb6c5 (patch) | |
| tree | 2101960ceceb41bd2907216e912eef76f2a80030 /source/slang | |
| parent | a4fabfc85527bd4807a603dcde7c0a3762b11136 (diff) | |
fix warnings
Diffstat (limited to 'source/slang')
| -rw-r--r-- | source/slang/check.cpp | 4 | ||||
| -rw-r--r-- | source/slang/emit.cpp | 2 | ||||
| -rw-r--r-- | source/slang/lower-to-ir.cpp | 2 | ||||
| -rw-r--r-- | source/slang/lower.cpp | 2 | ||||
| -rw-r--r-- | source/slang/syntax.cpp | 4 |
5 files changed, 7 insertions, 7 deletions
diff --git a/source/slang/check.cpp b/source/slang/check.cpp index d01c913b1..58c1762bb 100644 --- a/source/slang/check.cpp +++ b/source/slang/check.cpp @@ -1661,7 +1661,7 @@ namespace Slang if (!declRefType) return false; - auto subStructTypeDecl = declRefType->declRef.getDecl()->As<AggTypeDecl>(); + auto structTypeDecl = declRefType->declRef.getDecl()->As<AggTypeDecl>(); //TODO: What do we do if type is a generic specialization? // i.e. if the struct defines typedef Generic<float> T; // how to check if T satisfies the associatedtype constraints? @@ -1669,7 +1669,7 @@ namespace Slang bool conformance = true; for (auto & inheritanceDecl : constraintList) { - conformance = conformance && checkConformance(subStructTypeDecl, inheritanceDecl.Ptr()); + conformance = conformance && checkConformance(structTypeDecl, inheritanceDecl.Ptr()); } return conformance; } diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index 849ca7e66..fc6fc0184 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -1194,7 +1194,7 @@ struct EmitVisitor EmitDeclarator(declarator); } - void visitThisType(ThisType* type, TypeEmitArg const&) + void visitThisType(ThisType* /*type*/, TypeEmitArg const&) { return; } diff --git a/source/slang/lower-to-ir.cpp b/source/slang/lower-to-ir.cpp index 4595a0319..e149036a7 100644 --- a/source/slang/lower-to-ir.cpp +++ b/source/slang/lower-to-ir.cpp @@ -882,7 +882,7 @@ struct ValLoweringVisitor : ValVisitor<ValLoweringVisitor, LoweredValInfo, Lower } } - LoweredTypeInfo visitThisType(ThisType* type) + LoweredTypeInfo visitThisType(ThisType* /*type*/) { return LoweredTypeInfo(); } diff --git a/source/slang/lower.cpp b/source/slang/lower.cpp index a9daa6eba..e2c9496f4 100644 --- a/source/slang/lower.cpp +++ b/source/slang/lower.cpp @@ -2843,7 +2843,7 @@ struct LoweringVisitor { // not supported SLANG_UNREACHABLE("visitAssocTypeDecl in LowerVisitor"); - return LoweredDecl(); + UNREACHABLE_RETURN(LoweredDecl()); } LoweredDecl visitTypeDefDecl(TypeDefDecl* decl) diff --git a/source/slang/syntax.cpp b/source/slang/syntax.cpp index 9b6f6d44b..255cf4ff1 100644 --- a/source/slang/syntax.cpp +++ b/source/slang/syntax.cpp @@ -388,7 +388,7 @@ void Type::accept(IValVisitor* visitor, void* extra) return 0; } - bool ThisType::EqualsImpl(Type * type) + bool ThisType::EqualsImpl(Type * /*type*/) { return true; } @@ -399,7 +399,7 @@ void Type::accept(IValVisitor* visitor, void* extra) return this; } - RefPtr<Val> ThisType::SubstituteImpl(Substitutions* subst, int* ioDiff) + RefPtr<Val> ThisType::SubstituteImpl(Substitutions* subst, int* /*ioDiff*/) { while (subst) { |
