History

fix #56: initialize volr in all branches

This fixes 3 compiler warnings from gcc 7.2.0 of the form: In file included from src/helpers/resample.c:162:0: src/helpers/resamp3.inc: In function ‘dumb_resample_1_1’: src/helpers/resample.inc:134:72: warning: ‘volr’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Simon Naarmann committed 9 years ago

Commit 41114301 parent 6e924e61 file · +3 −0Browse files

Unified · Split

src/helpers/resample.inc+3−0
@@ -126,6 +126,7 @@ DUMB_RESAMPLER *dumb_start_resampler(SRCTYPE *src, int src_channels, long pos, l · 125 unmodified lines
126126 if ( volr == volt ) volume = NULL; \
127127 } else { \
128128 vol = 0; \
129+ volr = 0; \
129130 vold = 0; \
130131 volt = 0; \
131132 volm = 0; \
@@ -187,6 +188,7 @@ DUMB_RESAMPLER *dumb_start_resampler(SRCTYPE *src, int src_channels, long pos, l · 55 unmodified lines
187188 if ( lvolr == lvolt ) volume_left = NULL; \
188189 } else { \
189190 lvol = 0; \
191+ lvolr = 0; \
190192 lvold = 0; \
191193 lvolt = 0; \
192194 lvolm = 0; \
@@ -200,6 +202,7 @@ DUMB_RESAMPLER *dumb_start_resampler(SRCTYPE *src, int src_channels, long pos, l · 7 unmodified lines
200202 if ( rvolr == rvolt ) volume_right = NULL; \
201203 } else { \
202204 rvol = 0; \
205+ rvolr = 0; \
203206 rvold = 0; \
204207 rvolt = 0; \
205208 rvolm = 0; \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t