-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
Description
When building with --enable-vfio-user-server
, get the error:
FAILED: subprojects/libvfio-user/test/unit_tests.p/unit-tests.c.o
cc -m64 -Isubprojects/libvfio-user/test/unit_tests.p -Isubprojects/libvfio-user/test -I../../../subprojects/libvfio-user/test -Isubprojects/libvfio-user/include -I../../../subprojects/libvfio-user/include -Isubprojects/libvfio-user/lib -I../../../subprojects/libvfio-user/lib -I/usr/include/json-c -flto=auto -fdiagnostics-color=auto -Wall -Winvalid-pch -Wextra -Werror -std=gnu99 -O2 -g -mcx16 -msse2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fno-common -fwrapv -ftrivial-auto-var-init=zero -fzero-call-used-regs=used-gpr -fPIE -DUNIT_TEST -DWITH_TRAN_PIPE -D_GNU_SOURCE -Werror -DDEBUG -Wno-missing-field-initializers -Wmissing-declarations -Wwrite-strings -MD -MQ subprojects/libvfio-user/test/unit_tests.p/unit-tests.c.o -MF subprojects/libvfio-user/test/unit_tests.p/unit-tests.c.o.d -o subprojects/libvfio-user/test/unit_tests.p/unit-tests.c.o -c ../../../subprojects/libvfio-user/test/unit-tests.c
../../../subprojects/libvfio-user/test/unit-tests.c: In function ‘test_device_is_stopped_and_copying’:
../../../subprojects/libvfio-user/test/unit-tests.c:585:23: error: storing the address of local variable ‘migration’ in ‘vfu_ctx.migration’ [-Werror=dangling-pointer=]
585 | vfu_ctx.migration = &migration;
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
../../../subprojects/libvfio-user/test/unit-tests.c:584:22: note: ‘migration’ declared here
584 | struct migration migration;
| ^~~~~~~~~
../../../subprojects/libvfio-user/test/unit-tests.c:62:18: note: ‘vfu_ctx’ declared here
62 | static vfu_ctx_t vfu_ctx;
| ^~~~~~~