Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: virtio: fix zephyr build warning
Building the samples/subsys/ipc/openamp_rsc_table/ sample generates the following warning: [24/182] Building C object zephyr/CMakeFiles/zephyr.dir/lib/open-amp/resource_table.c.obj In file included from /zephyrproject/zephyr/lib/open-amp/./resource_table.h:11, from /zephyrproject/zephyr/lib/open-amp/resource_table.c:30: /zephyrproject/modules/lib/open-amp/open-amp/lib/include/openamp/virtio.h:83:2: warning: #warning "VIRTIO_DRIVER_SUPPORT and/or VIRTIO_DEVICE_SUPPORT should be defined" [-Wcpp] 83 | #warning "VIRTIO_DRIVER_SUPPORT and/or VIRTIO_DEVICE_SUPPORT should be defined" | ^~~~~~~ The issue occurs because the project includes the virtio API while VIRTIO_DRIVER_SUPPORT and VIRTIO_DEVICE_SUPPORT is only defined for the open-amp library build. Fix the warning by testing deprecated usage of VIRTIO_DRIVER_ONLY and VIRTIO_DEVICE_ONLY but not under #if !defined(VIRTIO_DRIVER_SUPPORT) && !defined(VIRTIO_DEVICE_SUPPORT) condition. Signed-off-by: Arnaud Pouliquen <[email protected]>
- Loading branch information