Zero initialize local variables (#5501)

Certain versions of GCC warn about these variables being potentially uninitialized when used.
I believe this is a false-positive, but zero-init'ing them is a safe way to fix this.
This commit is contained in:
Ben Clayton 2023-12-11 15:32:45 +00:00 committed by GitHub
parent 6b4f0c9d0b
commit d75b3cfbb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -560,7 +560,7 @@ bool Optimizer::RegisterPassFromFlag(const std::string& flag) {
"--switch-descriptorset requires a from:to argument."); "--switch-descriptorset requires a from:to argument.");
return false; return false;
} }
uint32_t from_set, to_set; uint32_t from_set = 0, to_set = 0;
const char* start = pass_args.data(); const char* start = pass_args.data();
const char* end = pass_args.data() + pass_args.size(); const char* end = pass_args.data() + pass_args.size();