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
126 if ( volr == volt ) volume = NULL; \126 if ( volr == volt ) volume = NULL; \
127 } else { \127 } else { \
128 vol = 0; \128 vol = 0; \
129 volr = 0; \
129 vold = 0; \130 vold = 0; \
130 volt = 0; \131 volt = 0; \
131 volm = 0; \132 volm = 0; \
@@ -187,6 +188,7 @@ DUMB_RESAMPLER *dumb_start_resampler(SRCTYPE *src, int src_channels, long pos, l · 55 unmodified lines
187 if ( lvolr == lvolt ) volume_left = NULL; \188 if ( lvolr == lvolt ) volume_left = NULL; \
188 } else { \189 } else { \
189 lvol = 0; \190 lvol = 0; \
191 lvolr = 0; \
190 lvold = 0; \192 lvold = 0; \
191 lvolt = 0; \193 lvolt = 0; \
192 lvolm = 0; \194 lvolm = 0; \
@@ -200,6 +202,7 @@ DUMB_RESAMPLER *dumb_start_resampler(SRCTYPE *src, int src_channels, long pos, l · 7 unmodified lines
200 if ( rvolr == rvolt ) volume_right = NULL; \202 if ( rvolr == rvolt ) volume_right = NULL; \
201 } else { \203 } else { \
202 rvol = 0; \204 rvol = 0; \
205 rvolr = 0; \
203 rvold = 0; \206 rvold = 0; \
204 rvolt = 0; \207 rvolt = 0; \
205 rvolm = 0; \208 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