From 69e898a5f2a158b16adc450ba29250b9f5878be7 Mon Sep 17 00:00:00 2001 From: Anders Hoglund Date: Mon, 16 Jan 2017 16:52:39 +0100 Subject: [PATCH] Fix cppcheck error, uninitialized var. --- src/main/sensors/esc_sensor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/sensors/esc_sensor.c b/src/main/sensors/esc_sensor.c index d49289a3d..aad7b1ea4 100644 --- a/src/main/sensors/esc_sensor.c +++ b/src/main/sensors/esc_sensor.c @@ -186,7 +186,7 @@ bool escSensorInit(void) // Initialize serial port escSensorPort = openSerialPort(portConfig->identifier, FUNCTION_ESC_SENSOR, escSensorDataReceive, ESC_SENSOR_BAUDRATE, MODE_RX, options); - for (int i; i < MAX_SUPPORTED_MOTORS; i = i + 1) { + for (int i = 0; i < MAX_SUPPORTED_MOTORS; i = i + 1) { escSensorData[i].dataAge = ESC_DATA_INVALID; }