From bc43b1595f76979a62470cee46e382eddfb470da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Thu, 3 Aug 2017 18:12:15 +0200 Subject: [PATCH] Fix for loop for C99 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > ui/helpers.c:78:2: error: ‘for’ loop initial declarations are only allowed in C99 mode --- ui/helpers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/helpers.c b/ui/helpers.c index db71972..5d71275 100644 --- a/ui/helpers.c +++ b/ui/helpers.c @@ -75,7 +75,8 @@ char * hex_to_bitmap(char hex_digit) { char *bitmap = malloc(5 * sizeof(char)); bitmap[4] = '\0'; - for(int i = 3; i >= 0; i--) { + int i; + for(i = 3; i >= 0; i--) { bitmap[i] = digit % 2 ? '1' : '0'; digit /= 2; }