From 724fd8cbc76972a0ee2e6452bc8b79dc3ae9d4c0 Mon Sep 17 00:00:00 2001 From: Arnaud ZANETTI Date: Tue, 31 Oct 2017 14:01:53 +0100 Subject: [PATCH] Fix another initialized variable ; the reason why -Wall didn't catch it was the -g flag ; with -O2 flag initialized variables raise warnings. --- player/Makefile | 2 +- player/limeplayer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/player/Makefile b/player/Makefile index 52220d5..ab1ba11 100644 --- a/player/Makefile +++ b/player/Makefile @@ -1,4 +1,4 @@ -CC=gcc -g -Wall +CC=gcc -O2 -Wall limeplayer: limeplayer.c $(CC) -o limeplayer limeplayer.c -lLimeSuite diff --git a/player/limeplayer.c b/player/limeplayer.c index 731dc37..73046fe 100644 --- a/player/limeplayer.c +++ b/player/limeplayer.c @@ -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;