From 98ad0b490e8c5b3f32c7de0ce252266a3c24a84e Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 2 Dec 2014 17:25:14 +0100 Subject: mds-kbdc: files with syntax errors are not empty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds-kbdc/make-tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mds-kbdc') diff --git a/src/mds-kbdc/make-tree.c b/src/mds-kbdc/make-tree.c index 14db125..a8f20ee 100644 --- a/src/mds-kbdc/make-tree.c +++ b/src/mds-kbdc/make-tree.c @@ -864,7 +864,8 @@ static int check_whether_file_is_empty(state_t* restrict state) /* Warn about empty files. */ if (parsing_result->tree == NULL) - NEW_ERROR(0, WARNING, "file is empty"); + if (parsing_result->errors_ptr == 0) + NEW_ERROR(0, WARNING, "file is empty"); return 0; pfail: -- cgit v1.2.3-70-g09d2