Fix another initialized variable ; the reason why -Wall didn't catch it

was the -g flag ; with -O2 flag initialized variables raise warnings.
This commit is contained in:
Arnaud ZANETTI 2017-10-31 14:01:53 +01:00
parent f0e92bcb3f
commit 724fd8cbc7
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
CC=gcc -g -Wall
CC=gcc -O2 -Wall
limeplayer: limeplayer.c
$(CC) -o limeplayer limeplayer.c -lLimeSuite

View File

@ -304,7 +304,7 @@ int main(int argc, char *const argv[]){
if(16 == bits){
// Scale down to 12-bit
// Quick and dirty, so -1 (0xFFFF) to -15 (0xFFF1) scale down to -1 instead of 0
int i;
int i = 0;
while(i < nSamples){
sampleBuffer[i].i >>= 4;
sampleBuffer[i].q >>= 4;