With some compilers and picky compiler settings, ignoring the return
value of fgets() can cause compilation to fail.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
goto fail;
}
ok:
- /* Swallow possible blank line following section */
- fgets(line, sizeof(line), stdin);
+ /* Swallow possible blank line following section. Picky
+ * compiler settings don't allow the return value to be
+ * ignored, so make the compiler happy.
+ */
+ if (fgets(line, sizeof(line), stdin) == NULL) {
+ ;
+ }
DEBUG(DEBUG_INFO, ("Parsing reclock done\n"));
return true;