You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Fix Coverity reports of uninitialized scalar variable
Fixes most current reports on Coverity Scan of uninitialized scalar variable (CWE-457): https://cwe.mitre.org/data/definitions/457.html These happen most of the time (in our code) when instanciating structs without a constructor (or with an incomplete one), and later returning the instance. This is sometimes intended though, as some parameters are only used in some situations and should not be double-initialized for performance reasons (e.g. `constant` in ShaderLanguage::Token).
This commit is contained in:
@@ -122,6 +122,14 @@ class AppxPackager {
|
||||
Vector<BlockHash> hashes;
|
||||
uLong file_crc32;
|
||||
ZPOS64_T zip_offset;
|
||||
|
||||
FileMeta() :
|
||||
lfh_size(0),
|
||||
compressed(false),
|
||||
compressed_size(0),
|
||||
uncompressed_size(0),
|
||||
file_crc32(0),
|
||||
zip_offset(0) {}
|
||||
};
|
||||
|
||||
String progress_task;
|
||||
|
||||
Reference in New Issue
Block a user