Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Anton Khirnov <anton@khirnov.net>
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH 5/9] fftools/ffmpeg_mux_init: change 1-bit bitfields from int to unsigned
Date: Thu, 14 Dec 2023 20:31:34 +0100
Message-ID: <20231214193138.2503-5-anton@khirnov.net> (raw)
In-Reply-To: <20231214193138.2503-1-anton@khirnov.net>

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"                      },
-- 
2.42.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  parent reply	other threads:[~2023-12-14 19:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 19:31 [FFmpeg-devel] [PATCH 1/9] fftools/ffmpeg_mux: stop logging to AVFormatContext Anton Khirnov
2023-12-14 19:31 ` [FFmpeg-devel] [PATCH 2/9] fftools/ffmpeg: deprecate -fps_mode/vsync drop Anton Khirnov
2023-12-14 19:31 ` [FFmpeg-devel] [PATCH 3/9] fftools/ffmpeg_mux: factor timestamps processing out of write_packet() Anton Khirnov
2023-12-14 19:31 ` [FFmpeg-devel] [PATCH 4/9] fftools/cmdutils: change option flags to (1 << N) style Anton Khirnov
2023-12-14 19:31 ` Anton Khirnov [this message]
2023-12-14 19:31 ` [FFmpeg-devel] [PATCH 6/9] fftools/ffmpeg: print keyframe information with -stats_* Anton Khirnov
2023-12-14 19:31 ` [FFmpeg-devel] [PATCH 7/9] doc/ffmpeg: drop misleading claims from -stats_*_fmt Anton Khirnov
2023-12-14 19:31 ` [FFmpeg-devel] [PATCH 8/9] fftools/ffmpeg_mux: deduplicate uniniting EncStats Anton Khirnov
2023-12-14 19:31 ` [FFmpeg-devel] [PATCH 9/9] fftools/ffmpeg: use a mutex for enc_stats_write() Anton Khirnov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231214193138.2503-5-anton@khirnov.net \
    --to=anton@khirnov.net \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git