comparison toys/cp.c @ 329:6773399539aa

Shut up some new aggressively stupid warnings gcc 4.3 produces.
author Rob Landley <rob@landley.net>
date Sun, 14 Dec 2008 01:08:37 -0600
parents 2134fa02ec00
children e134aebe79c1
comparison
equal deleted inserted replaced
328:48e0f1f45181 329:6773399539aa
107 107
108 // Inability to set these isn't fatal, some require root access. 108 // Inability to set these isn't fatal, some require root access.
109 // Can't do fchmod() etc here because -p works on mkdir, too. 109 // Can't do fchmod() etc here because -p works on mkdir, too.
110 110
111 if (toys.optflags & FLAG_p) { 111 if (toys.optflags & FLAG_p) {
112 int mask = umask(0); 112 int mask = umask(0), ignored;
113 struct utimbuf ut; 113 struct utimbuf ut;
114 114
115 fchown(fdout,srcst->st_uid, srcst->st_gid); 115 ignored = fchown(fdout,srcst->st_uid, srcst->st_gid);
116 ut.actime = srcst->st_atime; 116 ut.actime = srcst->st_atime;
117 ut.modtime = srcst->st_mtime; 117 ut.modtime = srcst->st_mtime;
118 utime(dst, &ut); 118 utime(dst, &ut);
119 umask(mask); 119 umask(mask);
120 } 120 }