mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hannes Eder <hannes@hanneseder.net>
To: Takashi Iwai <tiwai@suse.de>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 7/7] sound/oss: fix sparse warning: symbol shadows an earlier one
Date: Wed, 25 Feb 2009 22:29:47 +0100	[thread overview]
Message-ID: <20090225212937.9226.18355.stgit@vmbox.hanneseder.net> (raw)
In-Reply-To: <20090225212551.9226.64699.stgit@vmbox.hanneseder.net>

Impact: Move variable to a more inner scope.

Fix this sparse warning:
  sound/oss/sequencer.c:235:29: warning: symbol 'err' shadows an earlier one
  sound/oss/sequencer.c:215:13: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
---
 sound/oss/sequencer.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/sound/oss/sequencer.c b/sound/oss/sequencer.c
index 5c215f7..c798746 100644
--- a/sound/oss/sequencer.c
+++ b/sound/oss/sequencer.c
@@ -212,7 +212,6 @@ int sequencer_write(int dev, struct file *file, const char __user *buf, int coun
 {
 	unsigned char event_rec[EV_SZ], ev_code;
 	int p = 0, c, ev_size;
-	int err;
 	int mode = translate_mode(file);
 
 	dev = dev >> 4;
@@ -285,7 +284,7 @@ int sequencer_write(int dev, struct file *file, const char __user *buf, int coun
 		{
 			if (!midi_opened[event_rec[2]])
 			{
-				int mode;
+				int err, mode;
 				int dev = event_rec[2];
 
 				if (dev >= max_mididev || midi_devs[dev]==NULL)


  parent reply	other threads:[~2009-02-25 21:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-25 21:26 [PATCH 0/7] sound: fix sparse warnings Hannes Eder
2009-02-25 21:26 ` [PATCH 1/7] sound/usb/usx2y: fix sparse warning: Should it be static? Hannes Eder
2009-02-25 21:28 ` [PATCH 2/7] sound/usb/usx2y: fix sparse warning: do-while statement is not a compound Hannes Eder
2009-02-25 21:28 ` [PATCH 3/7] sound/pci/hda: fix sparse warning: different signedness Hannes Eder
2009-02-25 21:28 ` [PATCH 4/7] sound/pci/emu10k1: " Hannes Eder
2009-02-25 21:29 ` [PATCH 5/7] sound/drivers/vx: " Hannes Eder
2009-02-25 21:29 ` [PATCH 6/7] sound/oss: fix sparse warnings: " Hannes Eder
2009-02-25 21:29 ` Hannes Eder [this message]
2009-02-26  9:01 ` [PATCH 0/7] sound: fix sparse warnings Takashi Iwai

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=20090225212937.9226.18355.stgit@vmbox.hanneseder.net \
    --to=hannes@hanneseder.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.de \
    /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®