From patchwork Fri May 31 21:42:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 13363 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id DBDD6448991 for ; Sat, 1 Jun 2019 00:43:26 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BDE6E68AA47; Sat, 1 Jun 2019 00:43:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DE96C68AA39 for ; Sat, 1 Jun 2019 00:43:20 +0300 (EEST) Received: by mail-wm1-f66.google.com with SMTP id v22so6757931wml.1 for ; Fri, 31 May 2019 14:43:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hNv0CRfTOzprFq0X/RAf90xjIJ8dbpsdeFtDb2HS/oM=; b=jrMURF3G8LYJ9rLxn0bjdQWplihVo6ckrDqJvm/vmkXIl4EnFkexNnckq2GqarUBED /xoJlCoxfhsxT0FNQ2NHH6HbX+YYQqkAmlnxstJS75tX5cS0IKpuJVicuNa29znopoHt E/5/MBTjUK+44qMk+XnhNfg7eyhj/F3jE4GS7w0aUW8wChDJLoHA+2paIDn/O/r8XwJC lApP+Yy6GAhCeHDJZuYtMxCEBGxDClkXrgeHkPWqI4yk4t2qmaZWQbci6SAoTZVxMslK P2XpkYlpZtbm+QfrHui/Ih5H0NlyBYNBAZyfRuwYoRVQ5yXzkjHU2OjWSKIG/kRo0iOx RIHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hNv0CRfTOzprFq0X/RAf90xjIJ8dbpsdeFtDb2HS/oM=; b=NVtHv0jchnAR9aE9x2Ps8kSTsQPOSoBVGA43t34gjYX/eG+NBElDejWMSmDSuFlWI8 Kk0nVathW5foVZBA4S/LVsUhs/bKTxKfU52ZZqx2xVQvnXbo6c5LtnzLrxTJG+LdLmNB 4Q+qZwP/+Ww2hk7HeM6nB0V27G0uQFMZZs+sPKbRoIFxrKbYUUD8lpzV8NeWaUfsCGuS g1PvGg2UfNWD7LgdU1jYfB+cjE47lK122WwS2avRvQOSZ1TA8XXZmjoRRyFV7J9Csi23 oTm/CqiSIZEmEeoCjt2atCl4NY9ZfhDRACvts6yE4evKZRNwW7uoBKnz/s/Q6xE4EGZM gWzw== X-Gm-Message-State: APjAAAUa6ElpUd0yNkyKkEVQSDKpKx6+tvXNVtbJMQgTRMdQmm3O5Sj0 WQMu9GhXQ1E1twetEDg83G8RdrBL X-Google-Smtp-Source: APXvYqyfbQ3do1MIhby99jPaGhn8Q8vZ4g55x5V7mh0himqPA4Z2GKPuR+iq/qPp4vhhoUH88O4TZA== X-Received: by 2002:a1c:a7ca:: with SMTP id q193mr7355355wme.150.1559339000121; Fri, 31 May 2019 14:43:20 -0700 (PDT) Received: from localhost.localdomain (ipbcc063db.dynamic.kabel-deutschland.de. [188.192.99.219]) by smtp.gmail.com with ESMTPSA id y12sm5104734wrh.40.2019.05.31.14.43.18 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 31 May 2019 14:43:18 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 31 May 2019 23:42:20 +0200 Message-Id: <20190531214220.52436-1-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avformat/hcom: Remove unused variables 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The variables huffcount, rsrc_size and data_size were all set but not used. Therefore they have been removed. The entailed a chance to compactify calls to avio_skip; it has been used. This fixes -Wunused-but-set-variable warnings in GCC. Signed-off-by: Andreas Rheinhardt --- My earlier patch [1] forgot to compactify the calls to avio_skip. The loss of information regarding the offsets of certain fields doesn't seem important to me. [1]: https://ffmpeg.org/pipermail/ffmpeg-devel/2019-May/244001.html libavformat/hcom.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/libavformat/hcom.c b/libavformat/hcom.c index 0d1736b620..8152ee3052 100644 --- a/libavformat/hcom.c +++ b/libavformat/hcom.c @@ -38,17 +38,11 @@ static int hcom_probe(const AVProbeData *p) static int hcom_read_header(AVFormatContext *s) { AVStream *st; - unsigned data_size, rsrc_size, huffcount; unsigned compresstype, divisor; unsigned dict_entries; int ret; - avio_skip(s->pb, 83); - data_size = avio_rb32(s->pb); - rsrc_size = avio_rb32(s->pb); - avio_skip(s->pb, 128-91+4); - huffcount = avio_rb32(s->pb); - avio_skip(s->pb, 4); + avio_skip(s->pb, 128 + 12); compresstype = avio_rb32(s->pb); if (compresstype > 1) return AVERROR_INVALIDDATA;