mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ameer Armaly <ameer@bellsouth.net>
To: linux-kernel@vger.kernel.org
Subject: [patch] initialize variables to reduce i386 warnings
Date: Sat, 20 May 2006 19:19:48 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.61.0605201919100.2160@sg1> (raw)

Initialized cpu_freq in arch/i386/kernel/cpu/transmeta.c to suppress warning.

diff --git a/arch/i386/kernel/cpu/transmeta.c b/arch/i386/kernel/cpu/transmeta.c
index 7214c9b..0737890 100644
--- a/arch/i386/kernel/cpu/transmeta.c
+++ b/arch/i386/kernel/cpu/transmeta.c
@@ -9,7 +9,7 @@ static void __init init_transmeta(struct
  {
  	unsigned int cap_mask, uk, max, dummy;
  	unsigned int cms_rev1, cms_rev2;
-	unsigned int cpu_rev, cpu_freq, cpu_flags, new_cpu_rev;
+	unsigned int cpu_rev, cpu_freq = 0, cpu_flags, new_cpu_rev;
  	char cpu_info[65];

  	get_model_name(c);	/* Same as AMD/Cyrix */



!-------------------------------------------------------------flip-


More variable initializations to get rid of warnings.

diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
index df0e174..39838a1 100644
--- a/arch/i386/kernel/apm.c
+++ b/arch/i386/kernel/apm.c
@@ -1063,7 +1063,7 @@ #if defined(CONFIG_APM_DISPLAY_BLANK) &&

  static int apm_console_blank(int blank)
  {
-	int error, i;
+	int error = 0, i;
  	u_short state;
  	static const u_short dev[3] = { 0x100, 0x1FF, 0x101 };

diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c
index 9202b67..3a7e485 100644
--- a/arch/i386/kernel/efi.c
+++ b/arch/i386/kernel/efi.c
@@ -270,8 +270,8 @@ void efi_memmap_walk(efi_freemem_callbac
  {
  	int prev_valid = 0;
  	struct range {
-		unsigned long start;
-		unsigned long end;
+		unsigned long start = 0;
+		unsigned long end = 0;
  	} prev, curr;
  	efi_memory_desc_t *md;
  	unsigned long start, end;



!-------------------------------------------------------------flip-



             reply	other threads:[~2006-05-20 23:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-20 23:19 Ameer Armaly [this message]
2006-05-20 23:27 ` Michael Buesch
2006-05-21  0:02 ` Chris Wedgwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.61.0605201919100.2160@sg1 \
    --to=ameer@bellsouth.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®