[dpdk-dev] [PATCH] vhost: remove unneeded variable assignment

Emmanuel Roullit emmanuel.roullit at gmail.com
Tue Jan 24 21:31:29 CET 2017


Found with clang static analysis:
lib/librte_vhost/vhost_user.c:996:3: warning:
Value stored to 'ret' is never read
        ret = vhost_user_get_vring_base(dev, &msg.payload.state);
        ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 73c8f9f69c6c ("vhost: introduce reply ack feature")

Signed-off-by: Emmanuel Roullit <emmanuel.roullit at gmail.com>
---
 lib/librte_vhost/vhost_user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 7343a00a1..3391d5ea5 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -995,7 +995,7 @@ vhost_user_msg_handler(int vid, int fd)
 		break;
 
 	case VHOST_USER_GET_VRING_BASE:
-		ret = vhost_user_get_vring_base(dev, &msg.payload.state);
+		vhost_user_get_vring_base(dev, &msg.payload.state);
 		msg.size = sizeof(msg.payload.state);
 		send_vhost_message(fd, &msg);
 		break;
-- 
2.11.0



More information about the dev mailing list