From d9e5dd97c77d476e1fc597a87dabb353809ac973 Mon Sep 17 00:00:00 2001 From: Cedric Bastoul Date: Sun, 26 Jul 2015 09:30:31 +0200 Subject: [PATCH] Get rid of the warning about ignoring the return value of fgets --- source/loop.c | 2 +- source/names.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/loop.c b/source/loop.c index 9592503..cc07bff 100644 --- a/source/loop.c +++ b/source/loop.c @@ -316,7 +316,7 @@ CloogLoop *cloog_loop_read(CloogState *state, /* To read that stupid "0 0 0" line. */ while (fgets(s,MAX_STRING,foo) == 0) ; while ((*s=='#' || *s=='\n') || (sscanf(s," %d %d %d",&op1,&op2,&op3)<3)) - fgets(s,MAX_STRING,foo) ; + if (fgets(s, MAX_STRING, foo)); return cloog_loop_from_domain(state, domain, number); } diff --git a/source/names.c b/source/names.c index 20cadcc..4dbcb8f 100644 --- a/source/names.c +++ b/source/names.c @@ -271,7 +271,7 @@ char ** cloog_names_read_strings(FILE *file, int nb_items) /* We first read name option. */ while (fgets(s,MAX_STRING,file) == 0) ; while ((*s=='#' || *s=='\n') || (sscanf(s," %d",&option)<1)) - fgets(s,MAX_STRING,file) ; + if (fgets(s, MAX_STRING, file)); /* If there is no item to read, then return NULL. */ if (nb_items == 0) -- 2.11.4.GIT