]> git.sesse.net Git - ffmpeg/commitdiff
tests/audiomatch: Fix compile warning
authorSteven Liu <lingjiujianke@gmail.com>
Thu, 25 Aug 2016 12:40:17 +0000 (05:40 -0700)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 25 Aug 2016 16:37:29 +0000 (18:37 +0200)
Making sure bestpos is initialized to zero to prevent gcc from kvetching.
It's harmless (although it's not obvious that it's harmless)
from code inspection:
tests/audiomatch.c: In function ‘main’:
tests/audiomatch.c:40: warning: ‘bestpos’ may be used uninitialized in this function

Thanks to Moritz Barsnick for first bringing this to the attention.

Signed-off-by: LiuQi <liuqi@gosun.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tests/audiomatch.c

index 9752f6819ddc525d566daa70c5fa428c883c99aa..ca56df09b302eb49cf8c9b81064b45cc116bee8d 100644 (file)
@@ -37,7 +37,7 @@ int main(int argc, char **argv){
     FILE *f[2];
     int i, pos;
     int siglen, datlen;
-    int bestpos;
+    int bestpos = 0;
     double bestc=0;
     double sigamp= 0;
     int16_t *signal, *data;