From patchwork Wed Aug 24 14:20:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steven Liu X-Patchwork-Id: 280 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.134 with SMTP id o128csp394103vsd; Wed, 24 Aug 2016 07:20:25 -0700 (PDT) X-Received: by 10.28.216.67 with SMTP id p64mr3312987wmg.56.1472048425182; Wed, 24 Aug 2016 07:20:25 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id t124si9138065wmg.26.2016.08.24.07.20.24; Wed, 24 Aug 2016 07:20:25 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B8A25689A40; Wed, 24 Aug 2016 17:20:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk0-f193.google.com (mail-qk0-f193.google.com [209.85.220.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 63E2B68972E for ; Wed, 24 Aug 2016 17:20:11 +0300 (EEST) Received: by mail-qk0-f193.google.com with SMTP id v123so1254352qkh.3 for ; Wed, 24 Aug 2016 07:20:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=ClfB1TlvZLjZoOEj8Iv++WCVSmx/vRtwhA/YiX2R6R0=; b=XhtVFFv5Md7ciG6NQo8AZznyGPdsVRroOFPAlffhc1kG917uiwU+x0WhbKAYo25rpr z19u+hUGpYFsbQ/eL/bUJnSbuMFL4kPKIES0NCAmVqvO7mBkYThRr0jeQy/fMg5YukLH 5ARXIi/oP2VSF/p/vZ9RarSIKsNKZ+uEM9Z/L3j7/PC7wNMzdX0rSRJrH53ME5XBRTbS eBMJa6rQLygvurHqAx6n9rmwCvxhGlSXcvo9mYv6lOaIgSPOUJK2GRqyoBPTBBZxZBpE eDDjGCpjzWBn1jdRD6hM+EHqRVufZyk1QYDUWVFmDyX7QzEXA/kBG98z3n0Zvi+eFsX+ 8RjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ClfB1TlvZLjZoOEj8Iv++WCVSmx/vRtwhA/YiX2R6R0=; b=RB5Eu4kOIJnR9UUkBI6eRMqFf5ImIYf1sSSFS/o7I3DqXLCq06lg4FmhEJ4II2/cJ+ ZZl9BeJ+ssa830Ytyicdbtyt/MbBNF9zhAdYG47so2Q9TvexZOK7ZiRQf6KQsQsFta+J c3XuBr47txq3ko7bvIUAfU5CIvQ1FNLFPa56w0/+Cd82yYM8NTiMCa0voN8KIGohvOSg U7l4tD9EcVgqLFuugcV2wmJP1HDBOOLj7rpEhDBUsBzHVZXMhvkxZQg0acpUEbf03/a8 eUDufSIR55nrcAJplj0nZIHkpj589gXxc1NGhKNfHfuOUzKAN/sXnBnWrVkvJb74Ytnp wJPg== X-Gm-Message-State: AE9vXwM5//+Aq4qLFvfOgbqRbq0kocMY5t4nBSYj9Sourr1KQF5NeVE6S+p05DYVLHs0rWwOhy0UaeFOtCubMA== X-Received: by 10.55.79.4 with SMTP id d4mr3873467qkb.95.1472048412304; Wed, 24 Aug 2016 07:20:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.56.42 with HTTP; Wed, 24 Aug 2016 07:20:11 -0700 (PDT) From: Steven Liu Date: Wed, 24 Aug 2016 22:20:11 +0800 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [FFmpeg-devel] [PATCH] Fix audiomatch complie warning X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" 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 --- tests/audiomatch.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) -- 1.7.1 diff --git a/tests/audiomatch.c b/tests/audiomatch.c index 9752f68..9fb511f 100644 --- a/tests/audiomatch.c +++ b/tests/audiomatch.c @@ -37,11 +37,11 @@ int main(int argc, char **argv){ FILE *f[2]; int i, pos; int siglen, datlen; - int bestpos; - double bestc=0; - double sigamp= 0; + int bestpos = 0; + double bestc = 0; + double sigamp = 0; int16_t *signal, *data; - int maxshift= 16384; + int maxshift = 16384; if (argc < 3) { printf("audiomatch \n");