From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757681AbXFUEbe (ORCPT ); Thu, 21 Jun 2007 00:31:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756763AbXFUEa5 (ORCPT ); Thu, 21 Jun 2007 00:30:57 -0400 Received: from cantor2.suse.de ([195.135.220.15]:59834 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756662AbXFUEa4 (ORCPT ); Thu, 21 Jun 2007 00:30:56 -0400 From: NeilBrown To: Andrew Morton Date: Thu, 21 Jun 2007 14:30:45 +1000 Message-Id: <1070621043045.1081@suse.de> X-face: [Gw_3E*Gng}4rRrKRYotwlE?.2|**#s9D Cc: "J. Bruce Fields" Cc: Neil Brown Subject: [PATCH 003 of 8] knfsd: nfsd4: silence a compiler warning in ACL code References: <20070621142604.727.patches@notabene> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org From: "J. Bruce Fields" Silence a compiler warning in the ACL code, and add a comment making clear the initialization serves no other purpose. Signed-off-by: "J. Bruce Fields" Signed-off-by: Neil Brown ### Diffstat output ./fs/nfsd/nfs4acl.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff .prev/fs/nfsd/nfs4acl.c ./fs/nfsd/nfs4acl.c --- .prev/fs/nfsd/nfs4acl.c 2007-06-21 13:46:39.000000000 +1000 +++ ./fs/nfsd/nfs4acl.c 2007-06-21 14:10:06.000000000 +1000 @@ -183,8 +183,13 @@ static void summarize_posix_acl(struct posix_acl *acl, struct posix_acl_summary *pas) { struct posix_acl_entry *pa, *pe; - pas->users = 0; - pas->groups = 0; + + /* + * Only pas.users and pas.groups need initialization; previous + * posix_acl_valid() calls ensure that the other fields will be + * initialized in the following loop. But, just to placate gcc: + */ + memset(pas, 0, sizeof(*pas)); pas->mask = 07; pe = acl->a_entries + acl->a_count;