From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= Date: Thu, 13 Nov 2014 09:00:48 +0000 Subject: [U-Boot] [PATCH] x86: Fix a warning with gcc 4.4.4 In-Reply-To: <1415849275-9129-1-git-send-email-sjg@chromium.org> (Simon Glass's message of "Wed, 12 Nov 2014 20:27:55 -0700") References: <1415849275-9129-1-git-send-email-sjg@chromium.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Simon Glass writes: > This warning appears even though it seems that the compiler could work it > out. Fix it. > > Signed-off-by: Simon Glass > --- > > arch/x86/cpu/cpu.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c > index a4e639d..3583619 100644 > --- a/arch/x86/cpu/cpu.c > +++ b/arch/x86/cpu/cpu.c > @@ -238,6 +238,7 @@ static void identify_cpu(struct cpu_device_id *cpu) > int i; > > vendor_name[0] = '\0'; /* Unset */ > + cpu->device = 0; /* fix gcc 4.4.4 warning */ > > /* Find the id and vendor_name */ > if (!has_cpuid()) { > -- Do other gcc versions warn as well? 4.4 is old and worse than both 4.3 and 4.5 in many ways, so there's very little reason to be using it. If more sensible gcc versions do not warn, it's better leaving it as is to avoid real errors creeping in unnoticed. -- M?ns Rullg?rd mans at mansr.com