Skip to contentSkip to conversation

virtio: fix build with debug enabled

PATCH In review Stephen Hemminger 3 participants 3 messages Jun 13, 2014 3 messages not in the archive

lore
Share & tools
lore
#2 lore raw

PATCH 2/2 virtio: fix build with debug enabled

In reply to a message not in the archive

Remove useless message that breaks if VIRTIO_DEBUG_DRIVER is defined.
virtio_ethdev.c:224:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]

lib/librte_pmd_virtio/virtio_ethdev.c +0 -2
@@ -213,8 +213,6 @@ virtio_set_multiple_queues(struct rte_et
 	ctrl.hdr.cmd = VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET;
 	memcpy(ctrl.data, &nb_queues, sizeof(uint16_t));
 
-	PMD_INIT_LOG(DEBUG, "ctrl.data=%d\n", *(int *)ctrl.data);
-
 	dlen[0] = sizeof(uint16_t);
 
 	ret = virtio_send_command(hw->cvq, &ctrl, dlen, 1);
#4 lore raw
In reply to a message not in the archive

Acked by Changchun Ouyang

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Stephen Hemminger
Sent: Friday, June 13, 2014 9:33 AM
To: Stephen Hemminger
Cc: [email protected]
Subject: [dpdk-dev] [PATCH 2/2] virtio: fix build with debug enabled

Remove useless message that breaks if VIRTIO_DEBUG_DRIVER is defined.
virtio_ethdev.c:224:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]

lib/librte_pmd_virtio/virtio_ethdev.c +0 -2
@@ -213,8 +213,6 @@ virtio_set_multiple_queues(struct rte_et
 	ctrl.hdr.cmd = VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET;
 	memcpy(ctrl.data, &nb_queues, sizeof(uint16_t));
 
-	PMD_INIT_LOG(DEBUG, "ctrl.data=%d\n", *(int *)ctrl.data);
-
 	dlen[0] = sizeof(uint16_t);
 
 	ret = virtio_send_command(hw->cvq, &ctrl, dlen, 1);
Acked-by Changchun Ouyang
#5 lore raw
In reply to a message not in the archive

2014-06-12 18:32, Stephen Hemminger:

Quoted 4 lines

Remove useless message that breaks if VIRTIO_DEBUG_DRIVER is defined.
virtio_ethdev.c:224:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]

Applied for version 1.7.0.

Thanks

Signature · 1 line
Thomas