From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-media@vger.kernel.org
Cc: Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
Mehdi Djait <mehdi.djait@linux.intel.com>,
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
laurent.pinchart@ideasonboard.com
Subject: [raw2rgbpnm PATCH v3 1/3] Add explicit switch fallthrough notation
Date: Wed, 18 Feb 2026 10:34:22 +0200 [thread overview]
Message-ID: <20260218083424.2432541-2-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <20260218083424.2432541-1-sakari.ailus@linux.intel.com>
Use __attribute__((fallthrough)) instead of a comment this is taking
place, to make modern GCC happy.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
raw2rgbpnm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/raw2rgbpnm.c b/raw2rgbpnm.c
index baeb8efc863a..5df3ff7ab31d 100644
--- a/raw2rgbpnm.c
+++ b/raw2rgbpnm.c
@@ -362,7 +362,7 @@ static void raw_to_rgb(const struct format_info *info,
case V4L2_PIX_FMT_NV21:
color_pos = 0;
- /* fallthrough */
+ __attribute__((fallthrough));
case V4L2_PIX_FMT_NV12:
src_luma = src;
src_chroma = &src[src_width * src_height];
@@ -576,7 +576,7 @@ static void raw_to_rgb(const struct format_info *info,
case V4L2_PIX_FMT_SRGGB10:
if (raw_layout_to_grbg(info, src, src_width, src_height, src_stride))
error("Can't convert RAW layout to GRBG");
- /* fallthrough */
+ __attribute__((fallthrough));
case V4L2_PIX_FMT_SGRBG16:
case V4L2_PIX_FMT_SGRBG14:
case V4L2_PIX_FMT_SGRBG12:
@@ -620,7 +620,7 @@ static void raw_to_rgb(const struct format_info *info,
case V4L2_PIX_FMT_SRGGB8:
if (raw_layout_to_grbg(info, src, src_width, src_height, src_stride))
error("Can't convert RAW layout to GRBG");
- /* fallthrough */
+ __attribute__((fallthrough));
case V4L2_PIX_FMT_SGRBG8:
buf = malloc(src_width * src_height * 3);
if (buf==NULL) error("out of memory");
@@ -688,7 +688,7 @@ static void raw_to_rgb(const struct format_info *info,
case V4L2_PIX_FMT_BGR24:
swaprb = !swaprb;
- /* fallthrough */
+ __attribute__((fallthrough));
case V4L2_PIX_FMT_RGB24:
for (src_y = 0, dst_y = 0; dst_y < src_height; src_y++, dst_y++) {
for (src_x = 0, dst_x = 0; dst_x < src_width; ) {
--
2.47.3
next prev parent reply other threads:[~2026-02-18 8:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-18 8:34 [raw2rgbpnm PATCH v3 0/3] 10-bit packed raw support Sakari Ailus
2026-02-18 8:34 ` Sakari Ailus [this message]
2026-02-18 10:26 ` [raw2rgbpnm PATCH v3 1/3] Add explicit switch fallthrough notation Laurent Pinchart
2026-02-18 11:21 ` Sakari Ailus
2026-02-18 21:30 ` Laurent Pinchart
2026-02-18 8:34 ` [raw2rgbpnm PATCH v3 2/3] Add compiler options to avoid warnings Sakari Ailus
2026-02-18 10:27 ` Laurent Pinchart
2026-02-18 11:20 ` Sakari Ailus
2026-02-18 8:34 ` [raw2rgbpnm PATCH v3 3/3] Add 10-bit CSI-2 packed format support Sakari Ailus
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=20260218083424.2432541-2-sakari.ailus@linux.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=jacopo.mondi@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mehdi.djait@linux.intel.com \
--cc=tomi.valkeinen@ideasonboard.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox