From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757172AbaAGDCf (ORCPT ); Mon, 6 Jan 2014 22:02:35 -0500 Received: from g4t0016.houston.hp.com ([15.201.24.19]:47363 "EHLO g4t0016.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751968AbaAGDCe (ORCPT ); Mon, 6 Jan 2014 22:02:34 -0500 Message-ID: <1389063743.9937.7.camel@buesod1.americas.hpqcorp.net> Subject: Re: [PATCH 5/4] futex: silence uninitialized warnings From: Davidlohr Bueso To: Linus Torvalds Cc: Linux Kernel Mailing List , Ingo Molnar , Darren Hart , Peter Zijlstra , Thomas Gleixner , Paul McKenney , Mike Galbraith , Jeff Mahoney , Jason Low , Waiman Long , Tom Vaden , "Norton, Scott J" , "Chandramouleeswaran, Aswin" Date: Mon, 06 Jan 2014 19:02:23 -0800 In-Reply-To: References: <1388675120-8017-1-git-send-email-davidlohr@hp.com> <1388972316.4918.5.camel@buesod1.americas.hpqcorp.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.6.4 (3.6.4-3.fc18) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2014-01-07 at 10:55 +0800, Linus Torvalds wrote: > On Mon, Jan 6, 2014 at 9:38 AM, Davidlohr Bueso wrote: > > { > > int lock_taken, ret, force_take = 0; > > - u32 uval, newval, curval, vpid = task_pid_vnr(task); > > + u32 uval, newval, uninitialized_var(curval), vpid = task_pid_vnr(task); > > Do you have some broken compiler? I only notice this when testing this patchset on our servers with RHEL 6.4 (gcc 4.4.7 20120313 (Red Hat 4.4.7-3)). > I really tend to hate this kind of > workarounds, because as mentioned, they can actually hide valid > warnings, and it seems to be due to just stupid compilers. Are we > perhaps better off trying to get people off the broken compiler > versions instead? As Darren points out, this path is unlikely to change, but I have no particular preference otherwise.