From: Brian Behlendorf Date: Wed, 23 Feb 2011 21:03:19 +0000 (-0800) Subject: Fix 'statement with no effect' warning X-Git-Tag: zfs-0.6.0-rc2~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f6dcdf13f80ee039141ab92ae506bd4443111662;p=zfs Fix 'statement with no effect' warning Because the secpolicy_* macros are all currently defined to (0). And because the caller of this function does not check the return code. The compiler complains that this statement has no effect which is correct and OK. To suppress the warning explictly cast the result to (void). --- diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index b20e3b2c3..821ececde 100644 --- a/module/zfs/zfs_vnops.c +++ b/module/zfs/zfs_vnops.c @@ -2274,7 +2274,7 @@ top: /* * Remove setuid/setgid for non-privileged users */ - secpolicy_setid_clear(attr, cr); + (void) secpolicy_setid_clear(attr, cr); trim_mask = (mask & (ATTR_UID|ATTR_GID)); } else { need_policy = TRUE;