This is an automated email from Gerrit. "Antonio Borneo <borneo.anto...@gmail.com>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/7379
-- gerrit commit 9a93b950f0837bd1050bc55c19731bd9fe295ef9 Author: Antonio Borneo <borneo.anto...@gmail.com> 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 <borneo.anto...@gmail.com> diff --git a/src/flash/nor/lpc2900.c b/src/flash/nor/lpc2900.c index c30fa7637d..948def9829 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) { --