From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH 2/5] scripts: imx9image: fix warnings reported by clang
Date: Fri, 4 Sep 2026 09:59:14 +0200 [thread overview]
Message-ID: <20260904080025.147376-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20260904080025.147376-1-a.fatoum@pengutronix.de>
From: Ahmad Fatoum <a.fatoum@barebox.org>
Host tools inherit -Werror with CONFIG_WERROR=y and clang fails on:
scripts/imx9image.c:889:6: error: variable 'cont_img_count' set but not used [-Werror,-Wunused-but-set-variable]
scripts/imx9image.c:1263:33: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
Drop the unused counter and the extra parentheses.
Assisted-by: Claude:fable-5
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
scripts/imx9image.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/scripts/imx9image.c b/scripts/imx9image.c
index 61b7cc943f00..bd015a6ab7fc 100644
--- a/scripts/imx9image.c
+++ b/scripts/imx9image.c
@@ -886,7 +886,6 @@ static int build_container_qx_qm_b0(soc_type_t soc, uint32_t sector_size, uint32
const char *platform;
int container = -1;
- int cont_img_count = 0; /* indexes to arrange the container */
if (image_stack == NULL) {
fprintf(stderr, "Empty image stack ");
@@ -948,7 +947,6 @@ static int build_container_qx_qm_b0(soc_type_t soc, uint32_t sector_size, uint32
img_sp->src = file_off;
file_off += ALIGN(sbuf.st_size, sector_size);
- cont_img_count++;
break;
case DUMMY_V2X:
@@ -966,7 +964,6 @@ static int build_container_qx_qm_b0(soc_type_t soc, uint32_t sector_size, uint32
images_hash);
img_sp->src = file_off;
- cont_img_count++;
break;
case SECO:
@@ -986,7 +983,6 @@ static int build_container_qx_qm_b0(soc_type_t soc, uint32_t sector_size, uint32
img_sp->src = file_off;
file_off += sbuf.st_size;
- cont_img_count++;
break;
case NEW_CONTAINER:
@@ -995,7 +991,6 @@ static int build_container_qx_qm_b0(soc_type_t soc, uint32_t sector_size, uint32
CONTAINER_ALIGNMENT,
CONTAINER_FLAGS_DEFAULT,
fuse_version);
- cont_img_count = 0; /* reset img count when moving to new container */
scfw_flags = 0;
break;
@@ -1260,12 +1255,12 @@ static void print_image_array_fields(struct flash_header_v3 *container_hdrs, soc
if ((soc == ULP) || (soc == IMX9)) {
if (img_flags.core_id == CORE_ULP_UPOWER)
strcpy(img_name, "uPower FW");
- else if ((img_flags.core_id == CORE_ULP_CA35))
+ else if (img_flags.core_id == CORE_ULP_CA35)
if (app_cntr)
strcpy(img_name, "A core Image");
else
strcpy(img_name, "Bootloader");
- else if ((img_flags.core_id == CORE_ULP_CM33))
+ else if (img_flags.core_id == CORE_ULP_CM33)
strcpy(img_name, "M33");
} else {
--
2.47.3
next prev parent reply other threads:[~2026-09-04 8:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-04 7:59 [PATCH 0/5] clang: more warning and error fixes Ahmad Fatoum
2026-09-04 7:59 ` [PATCH 1/5] kbuild: emit asm-offsets markers as .ascii strings Ahmad Fatoum
2026-09-04 7:59 ` Ahmad Fatoum [this message]
2026-09-04 7:59 ` [PATCH 3/5] kbuild: disable -Wunused-but-set-variable after -Wall Ahmad Fatoum
2026-09-04 7:59 ` [PATCH 4/5] kbuild: disable -Winitializer-overrides for clang Ahmad Fatoum
2026-09-04 7:59 ` [PATCH 5/5] ARM64: cache: use WEAK() for v8_flush_l3_cache stub Ahmad Fatoum
2026-09-04 9:44 ` [PATCH 0/5] clang: more warning and error fixes Sascha Hauer
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=20260904080025.147376-3-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=a.fatoum@barebox.org \
--cc=barebox@lists.infradead.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
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