From 7471b5618cb5bee9cc5daaf26cc5d69770b4cb17 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 14 Dec 2008 01:08:37 -0600 Subject: Shut up some new aggressively stupid warnings gcc 4.3 produces. --- toys/cp.c | 4 ++-- toys/mdev.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/toys/cp.c b/toys/cp.c index 04c6369b..3aaa00fb 100644 --- a/toys/cp.c +++ b/toys/cp.c @@ -109,10 +109,10 @@ void cp_file(char *src, char *dst, struct stat *srcst) // Can't do fchmod() etc here because -p works on mkdir, too. if (toys.optflags & FLAG_p) { - int mask = umask(0); + int mask = umask(0), ignored; struct utimbuf ut; - fchown(fdout,srcst->st_uid, srcst->st_gid); + ignored = fchown(fdout,srcst->st_uid, srcst->st_gid); ut.actime = srcst->st_atime; ut.modtime = srcst->st_mtime; utime(dst, &ut); diff --git a/toys/mdev.c b/toys/mdev.c index 63c50823..39f66356 100644 --- a/toys/mdev.c +++ b/toys/mdev.c @@ -168,7 +168,9 @@ found_device: if (mknod(temp, mode | type, makedev(major, minor)) && errno != EEXIST) perror_exit("mknod %s failed", temp); - if (CFG_MDEV_CONF) chown(temp, uid, gid); + // Dear gcc: shut up about ignoring the return value here. If it doesn't + // work, what exactly are we supposed to do about it? + if (CFG_MDEV_CONF) mode=chown(temp, uid, gid); } static int callback(char *path, struct dirtree *node) -- cgit v1.2.3