mirror of https://github.com/mongodb/mongo
SERVER-112856 initialize _hasMembers to appease Coverity (#43885)
GitOrigin-RevId: aca362e1ed53c222ebb83d38efba5fb63d6e43b8
This commit is contained in:
parent
b11b9c9b2f
commit
402bc9855f
|
|
@ -1461,7 +1461,7 @@ class _CppHeaderFileWriter(_CppFileWriterBase):
|
||||||
# non-debug builds, and is marked MONGO_COMPILER_NO_UNIQUE_ADDRESS so that the
|
# non-debug builds, and is marked MONGO_COMPILER_NO_UNIQUE_ADDRESS so that the
|
||||||
# compiler knows that it should be optimized to take up no space when possible.
|
# compiler knows that it should be optimized to take up no space when possible.
|
||||||
self._writer.write_line(
|
self._writer.write_line(
|
||||||
"MONGO_COMPILER_NO_UNIQUE_ADDRESS mongo::idl::HasMembers<%s> _hasMembers;"
|
"MONGO_COMPILER_NO_UNIQUE_ADDRESS mongo::idl::HasMembers<%s> _hasMembers{};"
|
||||||
% len(_get_required_fields(struct))
|
% len(_get_required_fields(struct))
|
||||||
)
|
)
|
||||||
# Write constexpr struct data
|
# Write constexpr struct data
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue