diff mbox series

[meta-oe,088/128] flashrom: upgrade 1.6.0 -> 1.7.0

Message ID 20260628081122.178348-88-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-filesystems,001/128] ifuse: upgrade 1.2.0 -> 1.2.1 | expand

Commit Message

Khem Raj June 28, 2026, 8:10 a.m. UTC
License-Update: COPYING renamed to COPYING.rst; GPL-2.0-or-later unchanged

COPYING was renamed to COPYING.rst upstream; update LIC_FILES_CHKSUM.
Add a patch initializing time_start/time_end, which clang flags as
used-uninitialized.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 ...assic-Initialize-time_start-time_end.patch | 34 +++++++++++++++++++
 .../{flashrom_1.6.0.bb => flashrom_1.7.0.bb}  |  5 +--
 2 files changed, 37 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-bsp/flashrom/flashrom/0003-cli_classic-Initialize-time_start-time_end.patch
 rename meta-oe/recipes-bsp/flashrom/{flashrom_1.6.0.bb => flashrom_1.7.0.bb} (73%)
diff mbox series

Patch

diff --git a/meta-oe/recipes-bsp/flashrom/flashrom/0003-cli_classic-Initialize-time_start-time_end.patch b/meta-oe/recipes-bsp/flashrom/flashrom/0003-cli_classic-Initialize-time_start-time_end.patch
new file mode 100644
index 0000000000..34539ada96
--- /dev/null
+++ b/meta-oe/recipes-bsp/flashrom/flashrom/0003-cli_classic-Initialize-time_start-time_end.patch
@@ -0,0 +1,34 @@ 
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 23 Jun 2026 00:00:00 +0000
+Subject: [PATCH] cli_classic: Initialize time_start/time_end
+
+clang's -Wsometimes-uninitialized (promoted to an error via -Werror)
+flags that time_start may be used uninitialized at the function's "out:"
+label. Several early "goto out" paths execute before time(&time_start)
+runs, and the cleanup code calls difftime(time_end, time_start)
+unconditionally. Initialize both time_t variables at declaration so the
+value passed to difftime is always well defined.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ cli_classic.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cli_classic.c b/cli_classic.c
+index 1234567..89abcde 100644
+--- a/cli_classic.c
++++ b/cli_classic.c
+@@ -1055,7 +1055,7 @@ int main(int argc, char *argv[])
+ 	int ret = 0;
+ 	int all_matched_count = 0;
+ 	const char **all_matched_names = NULL;
+-	time_t time_start, time_end;
++	time_t time_start = 0, time_end = 0;
+
+ 	struct flashctx *context = NULL; /* holds the active detected chip and other info */
+ 	ret = flashrom_create_context(&context);
+--
+2.43.0
diff --git a/meta-oe/recipes-bsp/flashrom/flashrom_1.6.0.bb b/meta-oe/recipes-bsp/flashrom/flashrom_1.7.0.bb
similarity index 73%
rename from meta-oe/recipes-bsp/flashrom/flashrom_1.6.0.bb
rename to meta-oe/recipes-bsp/flashrom/flashrom_1.7.0.bb
index 2125f19dfe..bc9645f97a 100644
--- a/meta-oe/recipes-bsp/flashrom/flashrom_1.6.0.bb
+++ b/meta-oe/recipes-bsp/flashrom/flashrom_1.7.0.bb
@@ -2,12 +2,13 @@  DESCRIPTION = "flashrom is a utility for identifying, reading, writing, verifyin
 LICENSE = "GPL-2.0-or-later"
 HOMEPAGE = "http://flashrom.org"
 
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+LIC_FILES_CHKSUM = "file://COPYING.rst;md5=c0d58714ca15beeaed5b44a38116e133"
 SRC_URI = "https://download.flashrom.org/releases/flashrom-v${PV}.tar.xz \
            file://0002-meson-Add-options-pciutils-ftdi-usb.patch \
+           file://0003-cli_classic-Initialize-time_start-time_end.patch \
            "
 
-SRC_URI[sha256sum] = "8b9db3987df9b5fc81e70189d017905dd5f6be1e1410347f22687ab6d4c94423"
+SRC_URI[sha256sum] = "4328ace9833f7efe7c334bdd73482cde8286819826cc00149e83fba96bf3ab4f"
 
 S = "${UNPACKDIR}/flashrom-v${PV}"