src: fix clang15 compiler warnings

Below warnings are fixed.

1- A function declaration without a prototype is deprecated in all
versions of C [-Werror,-Wstrict-prototypes]

2- error: variable set but not used [-Werror,-Wunused-but-set-variable]

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: I1cf14b8e5e3e732ebc9cacc4b1cb9009276a8ea9
Reviewed-on: https://review.openocd.org/c/openocd/+/7569
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
This commit is contained in:
Erhan Kurubas
2023-04-02 00:26:51 +02:00
committed by Antonio Borneo
parent babec0fafa
commit bb073f897c
4 changed files with 4 additions and 12 deletions

View File

@@ -1553,7 +1553,6 @@ static int arm7_9_restore_context(struct target *target)
if (dirty) {
uint32_t mask = 0x0;
int num_regs = 0;
uint32_t regs[16];
if (mode_change) {
@@ -1576,7 +1575,6 @@ static int arm7_9_restore_context(struct target *target)
if (reg->dirty) {
regs[j] = buf_get_u32(reg->value, 0, 32);
mask |= 1 << j;
num_regs++;
reg->dirty = false;
reg->valid = true;
LOG_DEBUG("writing register %i mode %s "