From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751897AbdKID6U (ORCPT ); Wed, 8 Nov 2017 22:58:20 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:46944 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751472AbdKID6T (ORCPT ); Wed, 8 Nov 2017 22:58:19 -0500 From: Chandan Rajendra To: Miklos Szeredi Cc: Stephen Rothwell , Linux-Next Mailing List , Linux Kernel Mailing List Subject: Re: linux-next: build warning after merge of the overlayfs tree Date: Thu, 09 Nov 2017 09:29:14 +0530 In-Reply-To: <20171109093306.178c9ad2@canb.auug.org.au> References: <20171109093306.178c9ad2@canb.auug.org.au> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-TM-AS-GCONF: 00 x-cbid: 17110903-0020-0000-0000-000003CA390B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17110903-0021-0000-0000-0000425F542C Message-Id: <2083901.R5B31B2umx@localhost.localdomain> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-09_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1711090055 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, November 9, 2017 4:03:06 AM IST Stephen Rothwell wrote: > Hi Miklos, > > After merging the overlayfs tree, today's linux-next build (powerpc > ppc64_defconfig) produced this warning: > > fs/overlayfs/super.c: In function 'ovl_fill_super': > fs/overlayfs/super.c:1070:25: warning: 'numlower' may be used uninitialized in this function [-Wmaybe-uninitialized] > unsigned int stacklen, numlower, i; > ^ > fs/overlayfs/super.c:1069:15: warning: 'stack' may be used uninitialized in this function [-Wmaybe-uninitialized] > struct path *stack; > ^ > > The following trivial patch resolves the warnings, diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index fd11c05..602e686 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -1066,8 +1066,8 @@ static struct ovl_entry *ovl_get_lowerstack(struct super_block *sb, { int err; char *lowertmp, *lower; - struct path *stack; - unsigned int stacklen, numlower, i; + struct path *stack = NULL; + unsigned int stacklen, numlower = 0, i; bool remote = false; struct ovl_entry *oe; -- chandan