From 5fc0185878a6a343a64c6cde0253ca1aef8fd441 Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Thu, 2 Jul 2020 11:45:59 -0700 Subject: 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 --- source/slang/slang-ast-serialize.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source') 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& 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; -- cgit v1.2.3