Avoid cppcheck warnings; removing unused vars and a bit of cleanup.

Patch by: junky
Review: https://reviewboard.asterisk.org/r/1743/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Walter Doekes
2012-04-17 18:57:40 +00:00
parent 70c5ac6635
commit fc63e07135
33 changed files with 133 additions and 121 deletions

View File

@@ -440,7 +440,6 @@ static struct ast_frame *alsa_read(struct ast_channel *chan)
static int left = FRAME_SIZE;
snd_pcm_state_t state;
int r = 0;
int off = 0;
ast_mutex_lock(&alsalock);
f.frametype = AST_FRAME_NULL;
@@ -478,8 +477,6 @@ static struct ast_frame *alsa_read(struct ast_channel *chan)
snd_pcm_prepare(alsa.icard);
} else if (r < 0) {
ast_log(LOG_ERROR, "Read error: %s\n", snd_strerror(r));
} else if (r >= 0) {
off -= r;
}
/* Update positions */
readpos += r;