summaryrefslogtreecommitdiff
path: root/modules/pvr
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-04-19 13:04:41 +0200
committerRémi Verschelde <rverschelde@gmail.com>2018-04-19 15:20:45 +0200
commitbf7ca623a65f25cc4ac7a3ca0d6635331ec07c25 (patch)
tree40f6fa11f7dd41fd51343af01e1e298a2f7fd859 /modules/pvr
parent394e6d5ee1479d402892d6df75dddceeb967efcc (diff)
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).
Diffstat (limited to 'modules/pvr')
-rw-r--r--modules/pvr/texture_loader_pvr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp
index 76c0b969d8..8174bccdb7 100644
--- a/modules/pvr/texture_loader_pvr.cpp
+++ b/modules/pvr/texture_loader_pvr.cpp
@@ -536,8 +536,8 @@ static void decompress_pvrtc(PVRTCBlock *p_comp_img, const int p_2bit, const int
int p_x, p_y;
- int p_modulation[8][16];
- int p_modulation_modes[8][16];
+ int p_modulation[8][16] = { { 0 } };
+ int p_modulation_modes[8][16] = { { 0 } };
int Mod, DoPT;