summaryrefslogtreecommitdiffstats
path: root/fdisk/sfdisk.c
diff options
context:
space:
mode:
authorPetr Uzel2012-04-24 10:21:00 +0200
committerKarel Zak2012-04-27 12:30:49 +0200
commit077fdcdb2ae4a6804d48e5cb810d03317da4866e (patch)
tree85504816da2e9c7c27112e8362a4a5b6c6532acf /fdisk/sfdisk.c
parentfsck.minix.c: fix compiler warnings [-Wunused-result] (diff)
downloadkernel-qcow2-util-linux-077fdcdb2ae4a6804d48e5cb810d03317da4866e.tar.gz
kernel-qcow2-util-linux-077fdcdb2ae4a6804d48e5cb810d03317da4866e.tar.xz
kernel-qcow2-util-linux-077fdcdb2ae4a6804d48e5cb810d03317da4866e.zip
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>
Diffstat (limited to 'fdisk/sfdisk.c')
-rw-r--r--fdisk/sfdisk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c
index 01a32c32b..cda6a77d8 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) {