lib/vfio_user: Fix compiling warning of non-debug warning.

Logs are all changed to DEBUGLOG. If you compiles non-debug mode.
Gcc reports error. Using #ifdef DEBUG to exclude them.

Fixes #1903

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Idcaf083e430a77845fbd8443acade4b3f0e1efc9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7445
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
yidong0635 2021-04-16 10:13:23 +08:00 committed by Tomasz Zawadzki
parent 9d99392811
commit 5a752ae1aa

View File

@ -51,6 +51,7 @@ struct vfio_user_request {
int fd_num;
};
#ifdef DEBUG
static const char *vfio_user_message_str[VFIO_USER_MAX] = {
[VFIO_USER_VERSION] = "VFIO_USER_VERSION",
[VFIO_USER_DMA_MAP] = "VFIO_USER_DMA_MAP",
@ -65,6 +66,7 @@ static const char *vfio_user_message_str[VFIO_USER_MAX] = {
[VFIO_USER_DMA_WRITE] = "VFIO_USER_DMA_WRITE",
[VFIO_USER_DEVICE_RESET] = "VFIO_USER_DEVICE_RESET",
};
#endif
static int
vfio_user_write(int fd, void *buf, int len, int *fds, int num_fds)