PATCH: "enumeration value not handled in switch" in pcm_native.c

Muli Ben-Yehuda (mulix@mulix.org)
Tue, 7 Jan 2003 15:16:39 +0200


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.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/