lkml.org 
[lkml]   [2006]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Compile warning because of an uninitialized variable
Folks,

gcc generates a warning because of an uninitialized variable in arch/i386/kernel/cpu/transmeta.c.
The variable "cpu_freq" is initialized by a call to cpuid(). The following patch fixes the warning.

Regards,

Stephane.
--- linux-2.6.16.16/arch/i386/kernel/cpu/transmeta.c 2006-05-04 20:03:45.000000000 -0400
+++ linux-2.6.16.16-fixed/arch/i386/kernel/cpu/transmeta.c 2006-05-18 15:19:52.000000000 -0400
@@ -18,6 +18,7 @@
/* Print CMS and CPU revision */
max = cpuid_eax(0x80860000);
cpu_rev = 0;
+ cpu_freq = 0;
if ( max >= 0x80860001 ) {
cpuid(0x80860001, &dummy, &cpu_rev, &cpu_freq, &cpu_flags);
if (cpu_rev != 0x02000000) {
\
 
 \ /
  Last update: 2006-05-19 05:51    [W:1.560 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site