Fix some of the things clang --analyze flagged
This commit is contained in:
parent
352cd151e0
commit
98360bcd57
34 changed files with 58 additions and 112 deletions
|
@ -615,8 +615,6 @@ void Con_DrawNotify (void)
|
|||
|
||||
Field_BigDraw( &chatField, skip * BIGCHAR_WIDTH, v,
|
||||
SCREEN_WIDTH - ( skip + 1 ) * BIGCHAR_WIDTH, qtrue, qtrue );
|
||||
|
||||
v += BIGCHAR_HEIGHT;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -310,7 +310,7 @@ void S_AdpcmEncodeSound( sfx_t *sfx, short *samples ) {
|
|||
newchunk = SND_malloc();
|
||||
if (sfx->soundData == NULL) {
|
||||
sfx->soundData = newchunk;
|
||||
} else {
|
||||
} else if (chunk != NULL) {
|
||||
chunk->next = newchunk;
|
||||
}
|
||||
chunk = newchunk;
|
||||
|
|
|
@ -1452,7 +1452,6 @@ void S_UpdateBackgroundTrack( void ) {
|
|||
r = S_CodecReadStream(s_backgroundStream, fileBytes, raw);
|
||||
if(r < fileBytes)
|
||||
{
|
||||
fileBytes = r;
|
||||
fileSamples = r / (s_backgroundStream->info.width * s_backgroundStream->info.channels);
|
||||
}
|
||||
|
||||
|
|
|
@ -598,7 +598,7 @@ void S_PaintChannelFromMuLaw( channel_t *ch, sfx_t *sc, int count, int sampleOff
|
|||
samp[i].left += (data * leftvol)>>8;
|
||||
samp[i].right += (data * rightvol)>>8;
|
||||
samples++;
|
||||
if (samples == (byte *)chunk->sndChunk+(SND_CHUNK_SIZE*2)) {
|
||||
if (chunk != NULL && samples == (byte *)chunk->sndChunk+(SND_CHUNK_SIZE*2)) {
|
||||
chunk = chunk->next;
|
||||
samples = (byte *)chunk->sndChunk;
|
||||
}
|
||||
|
|
|
@ -2496,8 +2496,6 @@ qboolean S_AL_Init( soundInterface_t *si )
|
|||
devicelist += curlen + 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
devicelist = "";
|
||||
|
||||
s_alAvailableDevices = Cvar_Get("s_alAvailableDevices", devicenames, CVAR_ROM | CVAR_NORESTART);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue