Commit 5a752ae1 authored by yidong0635's avatar yidong0635 Committed by Tomasz Zawadzki
Browse files

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: default avataryidong0635 <dongx.yi@intel.com>
Change-Id: Idcaf083e430a77845fbd8443acade4b3f0e1efc9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7445


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent 9d993928
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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)