Closed dneto0 closed 7 months ago
These members are all included in virtually all the constructors' setting/clearing, so would typically be initialized.
I see the exception is the somewhat recent TType
constructor for block references, which for some reason has these three members missing from the constructor.
It seems worthwhile to me to include full construction (initialization) in all the constructors.
Looking at line ~1528, you can see these three missing in the block reference constructor:
// For interface blocks
TType(TTypeList* userDef, const TString& n, const TQualifier& q) :
basicType(EbtBlock), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false),
qualifier(q), arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr)
{
sampler.clear();
...
// for block reference (first parameter must be EbtReference)
explicit TType(TBasicType t, const TType &p, const TString& n) :
basicType(t), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false),
arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr)
The latter fails to initialize the same members the OP identifies. I think that should be fixed (but I don't see the warnings, or whether this is only some of them).
Closing this as we are not seeing this warning anymore.
There are a few warnings in GCC9 for maybe-uninitialized members of structs. Looking at the first example, I'm not sure there is a zero-cost fix for this. Do you advise turning off the warning? (This is low priority for me.)