From 2e34d6063bca03c9274828f2e87ccec621f76bc3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Cl=C3=A9ment=20DAVID?= Date: Thu, 11 Jun 2020 15:34:24 +0200 Subject: [PATCH] csvRead: fix C90 compatible variable declaration Change-Id: Iab05aa5937fb4a927e3c49f836833f19587db9fc --- scilab/modules/spreadsheet/src/c/csvRead.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scilab/modules/spreadsheet/src/c/csvRead.c b/scilab/modules/spreadsheet/src/c/csvRead.c index bbb65fd..1fd1887 100644 --- a/scilab/modules/spreadsheet/src/c/csvRead.c +++ b/scilab/modules/spreadsheet/src/c/csvRead.c @@ -511,12 +511,15 @@ static void moveEmptyLinesToEnd(wchar_t** lines, int* nonEmptyLines) // ============================================================================= static int hasOnlyBlankCharacters(wchar_t** line) { + const wchar_t* iter = *line; + + // EMPTY_STR is a tagged, non-allocated value for the empty string. It is + // used to flag a blank string. if (*line == EMPTY_STR) { return 1; } - const wchar_t* iter = *line; while (*iter == L'\t' || *iter == L'\r' || *iter == L'\n' || *iter == L' ') { iter++; -- 1.7.9.5