Commit 61ba93b4 authored by Ding Xiang's avatar Ding Xiang Committed by Takashi Iwai

selftests: ALSA: remove unused variables

These variables are never referenced in the code, just remove them.
Signed-off-by: default avatarDing Xiang <dingxiang@cmss.chinamobile.com>
Reviewed-by: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230908081040.197243-1-dingxiang@cmss.chinamobile.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 0bb80ecc
...@@ -431,7 +431,6 @@ long conf_get_long(snd_config_t *root, const char *key1, const char *key2, long ...@@ -431,7 +431,6 @@ long conf_get_long(snd_config_t *root, const char *key1, const char *key2, long
int conf_get_bool(snd_config_t *root, const char *key1, const char *key2, int def) int conf_get_bool(snd_config_t *root, const char *key1, const char *key2, int def)
{ {
snd_config_t *cfg; snd_config_t *cfg;
long l;
int ret; int ret;
if (!root) if (!root)
......
...@@ -188,7 +188,7 @@ static int wait_for_event(struct ctl_data *ctl, int timeout) ...@@ -188,7 +188,7 @@ static int wait_for_event(struct ctl_data *ctl, int timeout)
{ {
unsigned short revents; unsigned short revents;
snd_ctl_event_t *event; snd_ctl_event_t *event;
int count, err; int err;
unsigned int mask = 0; unsigned int mask = 0;
unsigned int ev_id; unsigned int ev_id;
...@@ -430,7 +430,6 @@ static bool strend(const char *haystack, const char *needle) ...@@ -430,7 +430,6 @@ static bool strend(const char *haystack, const char *needle)
static void test_ctl_name(struct ctl_data *ctl) static void test_ctl_name(struct ctl_data *ctl)
{ {
bool name_ok = true; bool name_ok = true;
bool check;
ksft_print_msg("%d.%d %s\n", ctl->card->card, ctl->elem, ksft_print_msg("%d.%d %s\n", ctl->card->card, ctl->elem,
ctl->name); ctl->name);
...@@ -863,7 +862,6 @@ static bool test_ctl_write_invalid_value(struct ctl_data *ctl, ...@@ -863,7 +862,6 @@ static bool test_ctl_write_invalid_value(struct ctl_data *ctl,
snd_ctl_elem_value_t *val) snd_ctl_elem_value_t *val)
{ {
int err; int err;
long val_read;
/* Ideally this will fail... */ /* Ideally this will fail... */
err = snd_ctl_elem_write(ctl->card->handle, val); err = snd_ctl_elem_write(ctl->card->handle, val);
...@@ -883,8 +881,7 @@ static bool test_ctl_write_invalid_value(struct ctl_data *ctl, ...@@ -883,8 +881,7 @@ static bool test_ctl_write_invalid_value(struct ctl_data *ctl,
static bool test_ctl_write_invalid_boolean(struct ctl_data *ctl) static bool test_ctl_write_invalid_boolean(struct ctl_data *ctl)
{ {
int err, i; int i;
long val_read;
bool fail = false; bool fail = false;
snd_ctl_elem_value_t *val; snd_ctl_elem_value_t *val;
snd_ctl_elem_value_alloca(&val); snd_ctl_elem_value_alloca(&val);
...@@ -994,8 +991,7 @@ static bool test_ctl_write_invalid_integer64(struct ctl_data *ctl) ...@@ -994,8 +991,7 @@ static bool test_ctl_write_invalid_integer64(struct ctl_data *ctl)
static bool test_ctl_write_invalid_enumerated(struct ctl_data *ctl) static bool test_ctl_write_invalid_enumerated(struct ctl_data *ctl)
{ {
int err, i; int i;
unsigned int val_read;
bool fail = false; bool fail = false;
snd_ctl_elem_value_t *val; snd_ctl_elem_value_t *val;
snd_ctl_elem_value_alloca(&val); snd_ctl_elem_value_alloca(&val);
...@@ -1027,7 +1023,6 @@ static bool test_ctl_write_invalid_enumerated(struct ctl_data *ctl) ...@@ -1027,7 +1023,6 @@ static bool test_ctl_write_invalid_enumerated(struct ctl_data *ctl)
static void test_ctl_write_invalid(struct ctl_data *ctl) static void test_ctl_write_invalid(struct ctl_data *ctl)
{ {
bool pass; bool pass;
int err;
/* If the control is turned off let's be polite */ /* If the control is turned off let's be polite */
if (snd_ctl_elem_info_is_inactive(ctl->info)) { if (snd_ctl_elem_info_is_inactive(ctl->info)) {
......
...@@ -257,7 +257,7 @@ static void find_pcms(void) ...@@ -257,7 +257,7 @@ static void find_pcms(void)
static void test_pcm_time(struct pcm_data *data, enum test_class class, static void test_pcm_time(struct pcm_data *data, enum test_class class,
const char *test_name, snd_config_t *pcm_cfg) const char *test_name, snd_config_t *pcm_cfg)
{ {
char name[64], key[128], msg[256]; char name[64], msg[256];
const int duration_s = 2, margin_ms = 100; const int duration_s = 2, margin_ms = 100;
const int duration_ms = duration_s * 1000; const int duration_ms = duration_s * 1000;
const char *cs; const char *cs;
...@@ -567,7 +567,7 @@ int main(void) ...@@ -567,7 +567,7 @@ int main(void)
{ {
struct card_data *card; struct card_data *card;
struct pcm_data *pcm; struct pcm_data *pcm;
snd_config_t *global_config, *cfg, *pcm_cfg; snd_config_t *global_config, *cfg;
int num_pcm_tests = 0, num_tests, num_std_pcm_tests; int num_pcm_tests = 0, num_tests, num_std_pcm_tests;
int ret; int ret;
void *thread_ret; void *thread_ret;
......
...@@ -313,7 +313,6 @@ TEST_F(pcmtest, ni_playback) { ...@@ -313,7 +313,6 @@ TEST_F(pcmtest, ni_playback) {
*/ */
TEST_F(pcmtest, reset_ioctl) { TEST_F(pcmtest, reset_ioctl) {
snd_pcm_t *handle; snd_pcm_t *handle;
unsigned char *it;
int test_res; int test_res;
struct pcmtest_test_params *params = &self->params; struct pcmtest_test_params *params = &self->params;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment