[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-nilfs
Subject:    [PATCH] nilfs-utils: kill gcc warning on fstab.c
From:       Ryusuke Konishi <konishi.ryusuke () lab ! ntt ! co ! jp>
Date:       2010-09-26 13:58:24
Message-ID: 1285509504-6287-1-git-send-email-konishi.ryusuke () lab ! ntt ! co ! jp
[Download RAW message or body]

Will kill the following gcc warning:

fstab.c: In function ¡Æupdate_mtab¡Ç:
fstab.c:573: warning: ignoring return value of ¡Æchown¡Ç, declared with attribute warn_unused_result

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
---
 sbin/mount/fstab.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/sbin/mount/fstab.c b/sbin/mount/fstab.c
index 2921915..c69502f 100644
--- a/sbin/mount/fstab.c
+++ b/sbin/mount/fstab.c
@@ -480,6 +480,7 @@ update_mtab (const char *dir, struct my_mntent *instead) {
 	const char *fnam = MOUNTED;
 	struct mntentchn mtabhead;	/* dummy */
 	struct mntentchn *mc, *mc0, *absent = NULL;
+	int ret;
 
 	if (mtab_does_not_exist() || mtab_is_a_symlink())
 		return;
@@ -570,7 +571,7 @@ update_mtab (const char *dir, struct my_mntent *instead) {
 	   */
 	    struct stat sbuf;
 	    if (stat (MOUNTED, &sbuf) == 0)
-		chown (MOUNTED_TEMP, sbuf.st_uid, sbuf.st_gid);
+		ret = chown(MOUNTED_TEMP, sbuf.st_uid, sbuf.st_gid);
 	}
 
 	/* rename mtemp to mtab */
-- 
1.6.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic