From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Murray Subject: Re: [PATCH 1/1] hvm.c: Prevent gcc uninitialised var warning Date: Thu, 26 Mar 2015 11:15:33 +0000 (UTC) Message-ID: <90392539.2799030.1427368533991.JavaMail.yahoo@mail.yahoo.com> References: <5513C7C4020000780006DBEA@mail.emea.novell.com> Reply-To: Ian Murray Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5513C7C4020000780006DBEA@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , Don Slutz Cc: Andrew Cooper , Keir Fraser , Ian Campbell , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org ----- Original Message ----- > From: Jan Beulich > To: Don Slutz > Cc: Ian Murray ; Andrew Cooper ; Keir Fraser ; Ian Campbell ; xen-devel@lists.xen.org > Sent: Thursday, 26 March 2015, 7:48 > Subject: Re: [Xen-devel] [PATCH 1/1] hvm.c: Prevent gcc uninitialised var warning > >>>> On 25.03.15 at 21:03, wrote: >> On 03/25/15 11:48, Jan Beulich wrote: >>>>>> On 25.03.15 at 16:02, > wrote: >>>> As an aside, the compiler is in a very easy position to spot this. > The >>>> error means that GCC has positively identified a basic block which > does >>>> use bufioreq_pfn before it has been initialised. >>>> >> >> If the compiler is right, how come the messages says: >> >> may be used >> >> which to me says that it's determination is not 100% > > No, that's a wrong interpretation of the wording - it instead means > that there is at least one path where the variable gets initialized, > and at least one where that's not provably the case. As opposed > to a variable being used uninitialized no matter what path leads to > the use site. > FWIW, I upgraded one of the boxes with the issue to Ubuntu 14.04.2 and gcc no longer complained. # gcc --version gcc-4.8.real (Ubuntu 4.8.2-19ubuntu1) 4.8.2 > > Jan > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel >