|
From: openocd-gerrit <ope...@us...> - 2022-12-03 09:25:33
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 0f034868f2c90741e57c5e27121e292b1774c080 (commit)
from 6ea1ccf3e6dd84c600c4ae9fb70347872634ded4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0f034868f2c90741e57c5e27121e292b1774c080
Author: Antonio Borneo <bor...@gm...>
Date: Wed Nov 16 01:02:02 2022 +0100
flash: lpc2900: fix clang error 'dead assignment'
The variable retval is assigned a value that is never used.
Scan-build reports:
Although the value stored to 'retval' is used in the
enclosing expression, the value is never actually read
from 'retval'.
Drop the dead assignment.
Change-Id: I11588dee748a55d52aa7f35bc1967b7df55af7fc
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7379
Tested-by: jenkins
diff --git a/src/flash/nor/lpc2900.c b/src/flash/nor/lpc2900.c
index c30fa7637..948def982 100644
--- a/src/flash/nor/lpc2900.c
+++ b/src/flash/nor/lpc2900.c
@@ -1132,9 +1132,9 @@ static int lpc2900_write(struct flash_bank *bank, const uint8_t *buffer,
* reduced size if that fails. */
struct working_area *warea;
uint32_t buffer_size = lpc2900_info->max_ram_block - 1 * KiB;
- while ((retval = target_alloc_working_area_try(target,
+ while (target_alloc_working_area_try(target,
buffer_size + target_code_size,
- &warea)) != ERROR_OK) {
+ &warea) != ERROR_OK) {
/* Try a smaller buffer now, and stop if it's too small. */
buffer_size -= 1 * KiB;
if (buffer_size < 2 * KiB) {
-----------------------------------------------------------------------
Summary of changes:
src/flash/nor/lpc2900.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|