summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2020-07-02 11:45:59 -0700
committerGitHub <noreply@github.com>2020-07-02 14:45:59 -0400
commit5fc0185878a6a343a64c6cde0253ca1aef8fd441 (patch)
tree622a598ed97106f5a9d389273e80b5b674592ee5
parent54675a3541dbe52c08272101b19d963418327d1b (diff)
Attempt to silence some warnings (#1428)
* Attempt to silence some warnings This is an attempt to change code in `slang-ast-serialize.cpp` so that it doesn't trigger a warning(-as-error) in one of our build configurations. The original code is fine in terms of expressing its intent, so the right answer might actually be to silence the warning. * fixup: make sure to actually initialize
-rw-r--r--source/slang/slang-ast-serialize.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/slang/slang-ast-serialize.cpp b/source/slang/slang-ast-serialize.cpp
index bc58ebebf..b1d7ba7e7 100644
--- a/source/slang/slang-ast-serialize.cpp
+++ b/source/slang/slang-ast-serialize.cpp
@@ -930,8 +930,7 @@ ASTSerialField _calcField(const char* name, T& in)
static ASTSerialClass _makeClass(MemoryArena* arena, ASTNodeType type, const List<ASTSerialField>& fields)
{
- ASTSerialClass cls = {};
- cls.type = type;
+ ASTSerialClass cls = { type, 0, 0, 0, 0 };
cls.fieldsCount = fields.getCount();
cls.fields = arena->allocateAndCopyArray(fields.getBuffer(), fields.getCount());
return cls;