mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-26 05:10:05 +00:00
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:
parent
6b4f0c9d0b
commit
d75b3cfbb7
@ -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();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user