diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-09-23 15:40:18 +0100 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-09-23 15:40:18 +0100 |
| commit | 7dc54160d1ada865f2a168e048fa3db8a24b4ceb (patch) | |
| tree | 3b11f77938de3dc90d6ce8dbdb9cd88d0a52eaff | |
| parent | 0df7e55941cf3b2f5be5f58ee54b982562858cc3 (diff) | |
fix pico-serprog build error on gcc 16
baud is already global. no need to pass it here.
gcc 16 is much stricter, so this resulted in a
warning that lead to a build error.
this patch fixes it.
Signed-off-by: Leah Rowe <leah@libreboot.org>
| -rw-r--r-- | config/module/pico-serprog/default/patches/0001-fix-build-error-enable_spi-baud.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/config/module/pico-serprog/default/patches/0001-fix-build-error-enable_spi-baud.patch b/config/module/pico-serprog/default/patches/0001-fix-build-error-enable_spi-baud.patch new file mode 100644 index 00000000..55445a1a --- /dev/null +++ b/config/module/pico-serprog/default/patches/0001-fix-build-error-enable_spi-baud.patch @@ -0,0 +1,39 @@ +From c5af7ae4716ddb729573df950eee0a4b8ce2d23e Mon Sep 17 00:00:00 2001 +From: Leah Rowe <leah@libreboot.org> +Date: Wed, 23 Sep 2026 15:38:45 +0100 +Subject: [PATCH 1/1] fix build error: enable_spi(baud) + +baud is a global variable in this code. we don't +need to pass it here. i think riku added this by +mistake. + +it would have resulted in a warning before, on +older compilers, but would have still compiled. + +on gcc 16, it fails with a build error. no worries. +semantically different with this change, but behaviour +remains the same. + +this fixes the build on gcc16, tested in arch linux. + +Signed-off-by: Leah Rowe <leah@libreboot.org> +--- + main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/main.c b/main.c +index b06f92f..36a9265 100644 +--- a/main.c ++++ b/main.c +@@ -322,7 +322,7 @@ int main() { + /* Setup USB */ + tusb_init(); + /* Setup PL022 SPI */ +- enable_spi(baud); ++ enable_spi(); + + command_loop(); + } +-- +2.47.3 + |
