On 03/20/2010 08:05 AM, Bruno Haible wrote: > Hi Jim or Eric, > > On MacOS X, with "gcc -Wall", I'm seeing this warning: > > gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT lchown.o -MD -MP -MF > .deps/lchown.Tpo -c -o lchown.o lchown.c > lchown.c: In function 'rpl_lchown': > lchown.c:73: warning: unused variable 'st' > > Is it ok to apply this as a fix?
Seems okay to me, although this is a smaller diff with the same results: diff --git i/lib/lchown.c w/lib/lchown.c index 0d2ecb0..a538087 100644 --- i/lib/lchown.c +++ w/lib/lchown.c @@ -70,11 +70,11 @@ lchown (const char *file, uid_t uid, gid_t gid) int rpl_lchown (const char *file, uid_t uid, gid_t gid) { - struct stat st; bool stat_valid = false; int result; # if CHOWN_CHANGE_TIME_BUG + struct stat st; if (gid != (gid_t) -1 || uid != (uid_t) -1) { if (lstat (file, &st)) -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature