ref: d9d61d0aaba8289ad4d0adde740b929e2e4caea4
parent: 97c9c4b9d3231aef615c8e17935b95ba3b9c8012
author: Erik de Castro Lopo <erikd@mega-nerd.com>
date: Mon Dec 15 03:59:17 EST 2008
src/samplerate.c : Move variable definition out one scope level to avoid warnings from static analysis tools. Thanks Erik Hovland.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-12-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/samplerate.c
+ Move variable definition out one scope level to avoid warnings from static
+ analysis tools. Thanks Erik Hovland.
+
2008-12-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* tests/multichan_throughput_test.c
--- a/src/samplerate.c
+++ b/src/samplerate.c
@@ -222,13 +222,13 @@
output_frames_gen = 0 ;
while (output_frames_gen < frames)
- {
+ { /* Use a dummy array for the case where the callback function
+ ** returns without setting the ptr.
+ */
+ float dummy [1] ;
+
if (src_data.input_frames == 0)
- { /* Use a dummy array for the case where the callback function
- ** returns without setting the ptr.
- */
- float dummy [1] ;
- float *ptr = dummy ;
+ { float *ptr = dummy ;
src_data.input_frames = psrc->callback_func (psrc->user_callback_data, &ptr) ;
src_data.data_in = ptr ;