diff Discovery/Src/simulation.c @ 51:8f8ea3a32e82

Resolved warnings pointing to possible invalid memory access
author Ideenmodellierer
date Tue, 31 Jul 2018 22:28:21 +0200
parents 5f11787b4f42
children cc9c18075e00
line wrap: on
line diff
--- a/Discovery/Src/simulation.c	Mon Jul 30 11:37:39 2018 +0200
+++ b/Discovery/Src/simulation.c	Tue Jul 31 22:28:21 2018 +0200
@@ -679,7 +679,10 @@
 
     SDiveState * pDiveState = &stateSim;
 
-    uint8_t depthDecoNext, depthLast, depthSecond, depthInc;
+    uint8_t depthDecoNext = 0;
+    uint8_t depthLast = 0;
+    uint8_t depthSecond = 0;
+	uint8_t depthInc = 0;
 
     for(int i = 1; i < 6; i++)
         outputConsumptionTempFloat[i] = 0;