From 5b76fada47fb059b90373bd3db8946a3c1462d0b Mon Sep 17 00:00:00 2001 From: Robert-B Date: Wed, 1 Mar 2017 12:41:41 +0100 Subject: [PATCH] older compiler - do not use for loops with variable decalaration --- examples/nordic_uart/nordic_uart.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/nordic_uart/nordic_uart.c b/examples/nordic_uart/nordic_uart.c index 1e0f2bd..36133e3 100644 --- a/examples/nordic_uart/nordic_uart.c +++ b/examples/nordic_uart/nordic_uart.c @@ -34,7 +34,8 @@ gatt_connection_t* m_connection; void notification_cb(uint16_t handle, const uint8_t* data, size_t data_length, void* user_data) { - for(int i = 0; i < data_length; i++) { + int i; + for(i = 0; i < data_length; i++) { printf("%c", data[i]); } }