aboutsummaryrefslogtreecommitdiff
path: root/ui/input-linux.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2024-02-21 19:07:51 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-02-22 12:47:40 +0100
commit7164f7e4028ad3b01a5f98c27482587b401ad420 (patch)
tree9dec7f5089e530fc9d7e98e07b103e1f695a8989 /ui/input-linux.c
parenta11f439a0ea99bc6bca371260a711ab940013b8f (diff)
hw/sparc/leon3: Fix wrong usage of DO_UPCAST macro
leon3.c currently fails to compile with some compilers when the -Wvla option has been enabled: ../hw/sparc/leon3.c: In function ‘leon3_cpu_reset’: ../hw/sparc/leon3.c:153:5: error: ISO C90 forbids variable length array ‘offset_must_be_zero’ [-Werror=vla] 153 | ResetData *s = (ResetData *)DO_UPCAST(ResetData, info[id], info); | ^~~~~~~~~ cc1: all warnings being treated as errors Looking at this code, the DO_UPCAST macro is indeed used in a wrong way here: DO_UPCAST is supposed to check that the second parameter is the first entry of the struct that the first parameter indicates, but since we use and index into the info[] array, this of course cannot work. The intention here was likely rather to use the container_of() macro instead, so switch the code accordingly. Fixes: d65aba8286 ("hw/sparc/leon3: implement multiprocessor") Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240221180751.190489-1-thuth@redhat.com> Tested-by: Clément Chigot <chigot@adacore.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'ui/input-linux.c')
0 files changed, 0 insertions, 0 deletions