From 13e495610a45d1cacdf9fa375472b302d30cd23e Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 1 Aug 2010 19:46:32 +0200 Subject: [PATCH] Rename some variables to avoid warnings on old gcc versions. Fortunately, gcc-4 no longer warns on these. However, gcc-3.3 is still supported for compiling paraslash, so rename "index" to "idx" and "conf" to "config" to get rid of warnings of the form wmadec_filter.c:1013: warning: declaration of `index' shadows a global declaration Add documentation of ->free_config() while we're at it. --- wmadec_filter.c | 6 +++--- write.h | 9 +++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/wmadec_filter.c b/wmadec_filter.c index aab7cf94..1f722932 100644 --- a/wmadec_filter.c +++ b/wmadec_filter.c @@ -1010,7 +1010,7 @@ static int wma_decode_block(struct private_wmadec_data *pwd) } next: for (ch = 0; ch < pwd->ahi.channels; ch++) { - int n4, index; + int n4, idx; n = pwd->block_len; n4 = pwd->block_len / 2; @@ -1020,8 +1020,8 @@ next: memset(pwd->output, 0, sizeof(pwd->output)); /* multiply by the window and add in the frame */ - index = (pwd->frame_len / 2) + pwd->block_pos - n4; - wma_window(pwd, &pwd->frame_out[ch][index]); + idx = (pwd->frame_len / 2) + pwd->block_pos - n4; + wma_window(pwd, &pwd->frame_out[ch][idx]); } /* update block number */ diff --git a/write.h b/write.h index c7196dc5..1361fcf1 100644 --- a/write.h +++ b/write.h @@ -39,10 +39,15 @@ struct writer { * It should check whether the command line options given by \a options are * valid. On success, it should return a pointer to the writer-specific * configuration data determined by \a options. Note that this might be called - * more than once with different values of \a options. + * more than once with different values of \a options. \sa \ref free_config(). */ void *(*parse_config)(const char *options); - void (*free_config)(void *conf); + /** + * Dellocate all configuration resources. + * + * This should free whatever was allocated by \ref parse_config(). + */ + void (*free_config)(void *config); /** * Open one instance of this writer. * -- 2.39.5