diff Discovery/Src/tMenu.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 cc8e24374b83
line wrap: on
line diff
--- a/Discovery/Src/tMenu.c	Mon Jul 30 11:37:39 2018 +0200
+++ b/Discovery/Src/tMenu.c	Tue Jul 31 22:28:21 2018 +0200
@@ -421,7 +421,9 @@
 
 void findValidPosition(uint8_t *pageOuput, uint8_t *lineOutput)
 {
-    uint8_t page, line, first;
+    uint8_t page = 0;
+    uint8_t line = 0;
+    uint8_t first = 0;
 
     *pageOuput = 0;
     *lineOutput = 0;
@@ -606,7 +608,7 @@
 
 void tM_refresh_live_content(void)
 {
-    uint8_t page;
+    uint8_t page = 0;
     char text[MAX_PAGE_TEXTSIZE];
     char subtext[MAX_PAGE_TEXTSIZE];
     uint16_t tabPosition;