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:
@ -97,7 +97,6 @@ class InputDefault : public Input {
|
||||
int hat_current;
|
||||
|
||||
Joypad() {
|
||||
|
||||
for (int i = 0; i < JOY_AXIS_MAX; i++) {
|
||||
|
||||
last_axis[i] = 0.0f;
|
||||
@ -110,6 +109,7 @@ class InputDefault : public Input {
|
||||
last_hat = HAT_MASK_CENTER;
|
||||
filter = 0.01f;
|
||||
mapping = -1;
|
||||
hat_current = 0;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user