From 077fdcdb2ae4a6804d48e5cb810d03317da4866e Mon Sep 17 00:00:00 2001 From: Petr Uzel Date: Tue, 24 Apr 2012 10:21:00 +0200 Subject: [PATCH] sfdisk: fix compiler warning [-Wunused-result] MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit sfdisk.c: In function ‘do_fdisk’: sfdisk.c:3212:11: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Werror=unused-result] Signed-off-by: Petr Uzel --- fdisk/sfdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c index 01a32c32b7..cda6a77d8f 100644 --- a/fdisk/sfdisk.c +++ b/fdisk/sfdisk.c @@ -3209,7 +3209,7 @@ do_fdisk(char *dev) { printf(_("Are you satisfied with this? [ynq] ")); else printf(_("Do you want to write this to disk? [ynq] ")); - fgets(answer, sizeof(answer), stdin); + ignore_result( fgets(answer, sizeof(answer), stdin) ); if (answer[0] == 'q' || answer[0] == 'Q') { errx(EXIT_FAILURE, _("Quitting - nothing changed")); } else if (rpmatch(answer) == 1) { -- 2.47.3