From patchwork Fri May 31 23:59:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 13364 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 95B12448C34 for ; Sat, 1 Jun 2019 03:00:19 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7C1D768A922; Sat, 1 Jun 2019 03:00:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 26D54689DB2 for ; Sat, 1 Jun 2019 03:00:13 +0300 (EEST) Received: by mail-wr1-f67.google.com with SMTP id c2so7537559wrm.8 for ; Fri, 31 May 2019 17:00:13 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=mfLdIBlbK0QV4fyVA4BBBHYsyvvUc72VRDucIWtIUsM=; b=s6VRWD9CxowUqtqx2cR6zZZyRKciliX1MkW+HUx4aNUHFYWsIdEEwDkajswVaZkv/i alQe2AaGly6rdZXR2jHTbSRikR+4ZtzCTxbNr/dVkv9gcJTgrUaNIOqtn5U39lADiB26 fh4SaHh+xnbyCaOEaFUD7gCT4anc/yswQIz4KN9W1xxDiF2z761xbP/8Ki+yzlpp/Wn0 ctjPcvbjXkW20L5wBJAkAuAP8utTjxnLokgVdC8qHbrHPNYmMAfvTiGGglBLHTGNo9CB kVmESIQKIC1bmm6Ue1skfvZEQ5FPjGq4W85m5riCLTbqm1Ttwrr1c7ncH8YewASAu4pk ECvw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=mfLdIBlbK0QV4fyVA4BBBHYsyvvUc72VRDucIWtIUsM=; b=fo55v1EZYAwe8VzAnBMLm2G97M/5UE9z8A4SoRUMO9PiU4QYivnTUTw4Wrd/3FR0AJ N8+rjcgQ+UHURK1r1H5korBvEsj9sCjEfPyu2HWhQLlK+KFS5Kud/A0qSq8JcYOQgpsn y9y6XtT7UEuoz55gVZbC4yZ2LIBJrkYnO1AudItPNF6wgxaNBqd9IacYo9SHW5mZJWUJ y3g+ZuCrYEHep5eggjFdmAhomaKyQLUKpkzFlOUyUJ7EVq9K2eo6qUSRT6DoUv6hR0Zo ++f/TaXOlxsys07dUGyICGmZK8fOz+KQ1kqSiYSifNp2cA/7nGDfbtkNxvicv8E/M6bB uq8w== X-Gm-Message-State: APjAAAVGdXhDZ64qa227iOEjWn+efkqyJoI40ZKw/wWRngxRragvOlEQ reea/lKMZOaX+HO1mmgiuEWXHG1o X-Google-Smtp-Source: APXvYqzj87ga3YmI1V8ljMjAzOlToSztWW7Nm3Kzs/Ha5R/pHjA3TIeJYgeUSCZ9ID0uxlfXrbZrtg== X-Received: by 2002:adf:ff88:: with SMTP id j8mr8411032wrr.317.1559347212426; Fri, 31 May 2019 17:00:12 -0700 (PDT) Received: from localhost.localdomain (ipbcc063db.dynamic.kabel-deutschland.de. [188.192.99.219]) by smtp.gmail.com with ESMTPSA id u9sm16424934wme.48.2019.05.31.17.00.11 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 31 May 2019 17:00:11 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 1 Jun 2019 01:59:12 +0200 Message-Id: <20190531235912.22368-1-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: References: MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3] 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. This entailed a chance to compactify calls to avio_skip; it has been used while retaining the information about the offsets of the huffcount etc. fields as comments. This fixes -Wunused-but-set-variable warnings in GCC. Signed-off-by: Andreas Rheinhardt --- libavformat/hcom.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/libavformat/hcom.c b/libavformat/hcom.c index 0d1736b620..9efbc3f434 100644 --- a/libavformat/hcom.c +++ b/libavformat/hcom.c @@ -38,17 +38,12 @@ 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, 83 + /* data_size */ 4 + /* rsrc_size */ 4 + + 128 - 91 + 4 + /* huffcount */ 4 + 4); compresstype = avio_rb32(s->pb); if (compresstype > 1) return AVERROR_INVALIDDATA;