[FFmpeg-devel] [PATCH 2/2] Fix audiomatch complie warning

Steven Liu lingjiujianke at gmail.com
Thu Aug 25 16:06:42 EEST 2016

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

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

Signed-off-by: LiuQi <liuqi at gosun.com>
 tests/audiomatch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/audiomatch.c b/tests/audiomatch.c
index 9752f68..ca56df0 100644
--- a/tests/audiomatch.c
+++ b/tests/audiomatch.c
@@ -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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Fix-audiomatch-complie-warning.patch
Type: application/octet-stream
Size: 1050 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160825/ca436fbe/attachment.obj>

More information about the ffmpeg-devel mailing list