aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2022-10-20 15:01:15 -0700
committerTony Luck <tony.luck@intel.com>2022-10-20 15:04:45 -0700
commit80b0edd6e94f532a5b8ffcfc4257a6f0a0f4aca0 (patch)
tree4b8edccd63ca7f12986427e56392df0dbacff596
parent724899c8405f3723f1f3c67de7a5b4429a81910a (diff)
downloadras-tools-80b0edd6e94f532a5b8ffcfc4257a6f0a0f4aca0.tar.gz
mca-recover: Fix compilation warning about fgets() return value
Some compilers complain: mca-recover.c:135:9: warning: ignoring return value of ‘fgets’ \ declared with attribute ‘warn_unused_result’ [-Wunused-result] Check the return value (even though it doesn't really matter). Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r--mca-recover.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mca-recover.c b/mca-recover.c
index 78068c7..7923804 100644
--- a/mca-recover.c
+++ b/mca-recover.c
@@ -132,7 +132,8 @@ int main(int argc, char **argv)
sigaction(SIGBUS, &recover_act, NULL);
- fgets(reply, sizeof reply, stdin);
+ if (fgets(reply, sizeof reply, stdin) == NULL)
+ printf("\nI said 'Press <ENTER>'. Continuing anyway\n");
i = consume_poison();