]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Rename some variables to avoid warnings on old gcc versions.
authorAndre Noll <maan@systemlinux.org>
Sun, 1 Aug 2010 17:46:32 +0000 (19:46 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 1 Aug 2010 17:46:32 +0000 (19:46 +0200)
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
write.h

index aab7cf94f76adc0311aa6cd925da00ad5d8323a4..1f72293273f32cac61b39ad669af2b0310b146ff 100644 (file)
@@ -1010,7 +1010,7 @@ static int wma_decode_block(struct private_wmadec_data *pwd)
        }
 next:
        for (ch = 0; ch < pwd->ahi.channels; ch++) {
        }
 next:
        for (ch = 0; ch < pwd->ahi.channels; ch++) {
-               int n4, index;
+               int n4, idx;
 
                n = pwd->block_len;
                n4 = pwd->block_len / 2;
 
                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 */
                        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 */
        }
 
        /* update block number */
diff --git a/write.h b/write.h
index c7196dc5644614e66525b1bfa524ec346579d64d..1361fcf1d052b31596f1407a81cc485b5fa833e1 100644 (file)
--- 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
         * 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 *(*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.
         *
        /**
         * Open one instance of this writer.
         *