From 6a016b4a8ac7bb70a5c7f5410ec94e6ec2bfb685 Mon Sep 17 00:00:00 2001
From: Federico Terraneo <fede.tft@miosix.org>
Date: Sun, 14 May 2017 11:47:44 +0200
Subject: [PATCH] Added volatile to prevent linter from reporting a warning

---
 src/shared/i2c/stm32f2_f4_i2c.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/shared/i2c/stm32f2_f4_i2c.cpp b/src/shared/i2c/stm32f2_f4_i2c.cpp
index 1382a3708..617305301 100644
--- a/src/shared/i2c/stm32f2_f4_i2c.cpp
+++ b/src/shared/i2c/stm32f2_f4_i2c.cpp
@@ -33,8 +33,8 @@
 
 using namespace miosix;
 
-static bool error;        ///< Set to true by IRQ on error
-static Thread *waiting=0; ///< Thread waiting for an operation to complete
+static volatile bool error; ///< Set to true by IRQ on error
+static Thread *waiting=0;   ///< Thread waiting for an operation to complete
 
 /* In non-DMA mode the variables below are used to
  * handle the reception of 2 or more bytes through 
-- 
GitLab