Fix some of the things clang --analyze flagged

This commit is contained in:
Tim Angus 2013-03-26 16:50:03 +00:00
parent 352cd151e0
commit 98360bcd57
34 changed files with 58 additions and 112 deletions

View file

@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
void daub4(float b[], unsigned long n, int isign)
{
float wksp[4097];
float wksp[4097] = { 0.0f };
float *a=b-1; // numerical recipies so a[1] = b[0]
unsigned long nh,nh1,i,j;
@ -146,7 +146,7 @@ void encodeWavelet( sfx_t *sfx, short *packets) {
newchunk = SND_malloc();
if (sfx->soundData == NULL) {
sfx->soundData = newchunk;
} else {
} else if (chunk != NULL) {
chunk->next = newchunk;
}
chunk = newchunk;
@ -215,7 +215,7 @@ void encodeMuLaw( sfx_t *sfx, short *packets) {
newchunk = SND_malloc();
if (sfx->soundData == NULL) {
sfx->soundData = newchunk;
} else {
} else if (chunk != NULL) {
chunk->next = newchunk;
}
chunk = newchunk;