From patchwork Thu Dec 14 19:31:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 45137 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:1225:b0:181:818d:5e7f with SMTP id v37csp5185612pzf; Thu, 14 Dec 2023 11:33:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IF3PNhkMoQmgLH/9GYLjFYYn7dPxwtXYvGZ1PUzevdh27w16YJHSkEMWBpIC63V8vz8iOFo X-Received: by 2002:a17:906:ba86:b0:9f2:3e76:5d39 with SMTP id cu6-20020a170906ba8600b009f23e765d39mr12115844ejd.0.1702582380975; Thu, 14 Dec 2023 11:33:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702582380; cv=none; d=google.com; s=arc-20160816; b=AH/7aF2ExMH6KwB01uAkTxOcChc1k2khPKOl5mH62O8qkiX/wbvlGAMw9NR+JsIpVQ mhhuoGP7D3MKDUBS7Tzue5DpJREw9N9DknkoxWWNQxs5Q5JoTWOI8rW3m1bM8bCGEhhs CUPTWazLoBLn0jFAWAeiNlSs7RN6OMAUTOkBQiqbSLXkzrGeGyEM2r1pGM9wjpjrXPWG +tpxucYiV7MlUUoFU5j2jiu+Egg5mSG64YvLaGrniz0/NThMQzMgRgzEgNR/5ugQTGR5 1Tc+s8hkW4z8Ti4/oHa+gUnY+DGgRzJGz754/utaqXJUWTs+i6N3Gwun0LoegmpKQFK8 SkPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=odWEmfwizhZ8lBPOhRiU3UhMiRs1yZsfD6C6jUzS1Xk=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=BYXY7G0OKPvScg019FDVa+Laq2SkCyXQTUIeBCkDLooack4imC6In0rjkefsNTTmqo nVVj6QRpDtN7bv1YzNYimJ6+sW6Qt91tTpQTnoYuSfYDw/nTUIrOAGYOCf+TEhb0oQfm zJMSxjfqB/nMMJ3LrvynPQ1zXpOe6EeKDlwER0w34qWItPIVj/3mEi0Tg8Gpe5R4yP1w Th9Tvi+bSTZtDByAfLut6vMMmpOJeAqE4X2wUu5qBXJByEhQ1Tgio0IEnWOv41EqqdIM 0zTAGUXBtcaiWFy9BDK7d8fsFoRMYgZDlWI3uMN1Ryf4G7bfcEnhoSeW6rkctrxGh056 tRSQ== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id u10-20020a17090657ca00b00a1d2851c02dsi6385794ejr.301.2023.12.14.11.32.59; Thu, 14 Dec 2023 11:33:00 -0800 (PST) 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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6D45F68D28C; Thu, 14 Dec 2023 21:32:48 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 03FA268D241 for ; Thu, 14 Dec 2023 21:32:39 +0200 (EET) Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 6E31713BB for ; Thu, 14 Dec 2023 20:32:39 +0100 (CET) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id 6hnlv4_r_ZqR for ; Thu, 14 Dec 2023 20:32:39 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id 643ED1BA2 for ; Thu, 14 Dec 2023 20:32:38 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 76AC73A067E for ; Thu, 14 Dec 2023 20:32:31 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Thu, 14 Dec 2023 20:31:34 +0100 Message-ID: <20231214193138.2503-5-anton@khirnov.net> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231214193138.2503-1-anton@khirnov.net> References: <20231214193138.2503-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/9] fftools/ffmpeg_mux_init: change 1-bit bitfields from int to unsigned X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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" X-TUID: Ik1+F2v11tsy They cannot store 1 as signed, only 0 and -1. Avoids warnings such as: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] --- fftools/ffmpeg_mux_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index f527a083db..f870d48136 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -288,9 +288,9 @@ static int enc_stats_init(OutputStream *ost, EncStats *es, int pre, static const struct { enum EncStatsType type; const char *str; - int pre_only:1; - int post_only:1; - int need_input_data:1; + unsigned pre_only:1; + unsigned post_only:1; + unsigned need_input_data:1; } fmt_specs[] = { { ENC_STATS_FILE_IDX, "fidx" }, { ENC_STATS_STREAM_IDX, "sidx" },