Skip to content

Commit 5fc0185

Browse files
author
Tim Foley
authored
Attempt to silence some warnings (shader-slang#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
1 parent 54675a3 commit 5fc0185

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

source/slang/slang-ast-serialize.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -930,8 +930,7 @@ ASTSerialField _calcField(const char* name, T& in)
930930

931931
static ASTSerialClass _makeClass(MemoryArena* arena, ASTNodeType type, const List<ASTSerialField>& fields)
932932
{
933-
ASTSerialClass cls = {};
934-
cls.type = type;
933+
ASTSerialClass cls = { type, 0, 0, 0, 0 };
935934
cls.fieldsCount = fields.getCount();
936935
cls.fields = arena->allocateAndCopyArray(fields.getBuffer(), fields.getCount());
937936
return cls;

0 commit comments

Comments
 (0)