sfdisk: fix compiler warning [-Wunused-result]

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 <petr.uzel@suse.cz>
This commit is contained in:
Petr Uzel 2012-04-24 10:21:00 +02:00 committed by Karel Zak
parent 28d4cdcb9d
commit 077fdcdb2a
1 changed files with 1 additions and 1 deletions

View File

@ -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) {