From cc9c19b0302a83be6520c38a0a9944314ccc6962 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 26 Jun 2021 22:03:14 -0400 Subject: sim: bpf: fix mixed decls & code warnings (and style) --- sim/bpf/bpf-helpers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sim/bpf/bpf-helpers.c') diff --git a/sim/bpf/bpf-helpers.c b/sim/bpf/bpf-helpers.c index c308812..79a3a7d 100644 --- a/sim/bpf/bpf-helpers.c +++ b/sim/bpf/bpf-helpers.c @@ -72,6 +72,7 @@ bpf_trace_printk (SIM_CPU *current_cpu) supported, which are read from %r3, %r4 and %r5 respectively. */ for (i = 0, tags_processed = 0; i < size;) { + UDI value; QI c = GETMEMUQI (current_cpu, CPU_PC_GET (current_cpu), fmt_address + i); @@ -88,7 +89,7 @@ bpf_trace_printk (SIM_CPU *current_cpu) if (i++ >= size) return -1; /* XXX look for kernel error code. */ - UDI value = GET_H_GPR (3 + tags_processed); + value = GET_H_GPR (3 + tags_processed); switch ((GETMEMUQI (current_cpu, CPU_PC_GET (current_cpu), fmt_address + i))) -- cgit v1.1