The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* PATCH: "enumeration value not handled in switch" in pcm_native.c
@ 2003-01-07 13:16 Muli Ben-Yehuda
  0 siblings, 0 replies; only message in thread
From: Muli Ben-Yehuda @ 2003-01-07 13:16 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: Linux-Kernel

sound/core/pcm_native.c has a few switch statements where
SNDRV_PCM_STATE_LAST is not handled. Add a 'default' case which
perserves the current semantics but silences the compiler up. Patch is
against 2.5.54-bk. 

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.976   -> 1.977  
#	sound/core/pcm_native.c	1.22    -> 1.23   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/01/07	mulix@alhambra.mulix.org	1.977
# fix 'enumeration value not handled in switch' warning
# --------------------------------------------
#
diff -Nru a/sound/core/pcm_native.c b/sound/core/pcm_native.c
--- a/sound/core/pcm_native.c	Tue Jan  7 14:24:06 2003
+++ b/sound/core/pcm_native.c	Tue Jan  7 14:24:06 2003
@@ -1081,6 +1081,8 @@
 		/* Fall through */
 	case SNDRV_PCM_STATE_SETUP:
 		goto _end;
+	default: 
+		break; 
 	}
 
 	if (runtime->status->state == SNDRV_PCM_STATE_RUNNING) {
@@ -1183,6 +1185,8 @@
 			spin_lock_irq(&runtime->lock);
 		}
 		goto _xrun_recovery;
+	default:
+		break; 
 	}
 	runtime->control->appl_ptr = runtime->status->hw_ptr;
        _end:
@@ -1236,6 +1240,8 @@
 			spin_lock_irq(&runtime->lock);
 		}
 		goto _xrun_recovery;
+	default: 
+		break; 
 	}
        _end:
 	spin_unlock_irq(&runtime->lock);
@@ -1278,6 +1284,8 @@
 	case SNDRV_PCM_STATE_XRUN:
 		snd_pcm_change_state(substream, SNDRV_PCM_STATE_SETUP);
 		break;
+	default: 
+		break; 
 	}
 	runtime->control->appl_ptr = runtime->status->hw_ptr;
        _end: 

-- 
Muli Ben-Yehuda

my opinions may seem crazy. But they all make sense. Insane sense, but
sense nontheless. -- Shlomi Fish on #offtopic.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-01-07 13:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-07 13:16 PATCH: "enumeration value not handled in switch" in pcm_native.c Muli Ben-Yehuda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox