* [PATCH] vhost: fix build with gcc 4.8
@ 2023-07-03 8:21 Ali Alnubani
2023-07-03 8:29 ` Maxime Coquelin
2023-07-06 9:05 ` Maxime Coquelin
0 siblings, 2 replies; 3+ messages in thread
From: Ali Alnubani @ 2023-07-03 8:21 UTC (permalink / raw)
To: dev; +Cc: maxime.coquelin
Adds braces around initializer to resolve the following
false-positive build error with gcc 4.8.5 on CentOS:
lib/vhost/vduse.c:441:9: error: missing braces around initializer
[-Werror=missing-braces]
Fixes: 653327e191f0 ("vhost: add multiqueue support to VDUSE")
Cc: maxime.coquelin@redhat.com
Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
---
lib/vhost/vduse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c
index a509daf80c..aa5f1f564d 100644
--- a/lib/vhost/vduse.c
+++ b/lib/vhost/vduse.c
@@ -438,7 +438,7 @@ vduse_device_create(const char *path)
pthread_t fdset_tid;
uint32_t i, max_queue_pairs, total_queues;
struct virtio_net *dev;
- struct virtio_net_config vnet_config = { 0 };
+ struct virtio_net_config vnet_config = {{ 0 }};
uint64_t ver = VHOST_VDUSE_API_VERSION;
uint64_t features = VDUSE_NET_SUPPORTED_FEATURES;
struct vduse_dev_config *dev_config = NULL;
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] vhost: fix build with gcc 4.8
2023-07-03 8:21 [PATCH] vhost: fix build with gcc 4.8 Ali Alnubani
@ 2023-07-03 8:29 ` Maxime Coquelin
2023-07-06 9:05 ` Maxime Coquelin
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2023-07-03 8:29 UTC (permalink / raw)
To: Ali Alnubani, dev
Hi Ali,
On 7/3/23 10:21, Ali Alnubani wrote:
> Adds braces around initializer to resolve the following
> false-positive build error with gcc 4.8.5 on CentOS:
> lib/vhost/vduse.c:441:9: error: missing braces around initializer
> [-Werror=missing-braces]
>
> Fixes: 653327e191f0 ("vhost: add multiqueue support to VDUSE")
> Cc: maxime.coquelin@redhat.com
>
> Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
> ---
> lib/vhost/vduse.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c
> index a509daf80c..aa5f1f564d 100644
> --- a/lib/vhost/vduse.c
> +++ b/lib/vhost/vduse.c
> @@ -438,7 +438,7 @@ vduse_device_create(const char *path)
> pthread_t fdset_tid;
> uint32_t i, max_queue_pairs, total_queues;
> struct virtio_net *dev;
> - struct virtio_net_config vnet_config = { 0 };
> + struct virtio_net_config vnet_config = {{ 0 }};
> uint64_t ver = VHOST_VDUSE_API_VERSION;
> uint64_t features = VDUSE_NET_SUPPORTED_FEATURES;
> struct vduse_dev_config *dev_config = NULL;
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
This is not going to introduce any functional change so this is fine,
but the DPDK documentation indicates the minimum requirement is GCC 4.9[0]:
"
General development tools including a supported C compiler such as gcc
(version 4.9+) or clang (version 3.4+), and pkg-config or pkgconf to be
used when building end-user binaries against DPDK.
"
Thanks,
Maxime
[0]:
http://doc.dpdk.org/guides/linux_gsg/sys_reqs.html#compilation-of-the-dpdk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] vhost: fix build with gcc 4.8
2023-07-03 8:21 [PATCH] vhost: fix build with gcc 4.8 Ali Alnubani
2023-07-03 8:29 ` Maxime Coquelin
@ 2023-07-06 9:05 ` Maxime Coquelin
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2023-07-06 9:05 UTC (permalink / raw)
To: Ali Alnubani, dev
On 7/3/23 10:21, Ali Alnubani wrote:
> Adds braces around initializer to resolve the following
> false-positive build error with gcc 4.8.5 on CentOS:
> lib/vhost/vduse.c:441:9: error: missing braces around initializer
> [-Werror=missing-braces]
>
> Fixes: 653327e191f0 ("vhost: add multiqueue support to VDUSE")
> Cc: maxime.coquelin@redhat.com
>
> Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
> ---
> lib/vhost/vduse.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c
> index a509daf80c..aa5f1f564d 100644
> --- a/lib/vhost/vduse.c
> +++ b/lib/vhost/vduse.c
> @@ -438,7 +438,7 @@ vduse_device_create(const char *path)
> pthread_t fdset_tid;
> uint32_t i, max_queue_pairs, total_queues;
> struct virtio_net *dev;
> - struct virtio_net_config vnet_config = { 0 };
> + struct virtio_net_config vnet_config = {{ 0 }};
> uint64_t ver = VHOST_VDUSE_API_VERSION;
> uint64_t features = VDUSE_NET_SUPPORTED_FEATURES;
> struct vduse_dev_config *dev_config = NULL;
Applied to dpdk-next-virtio/main.
Thanks,
Maxime
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-06 9:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-03 8:21 [PATCH] vhost: fix build with gcc 4.8 Ali Alnubani
2023-07-03 8:29 ` Maxime Coquelin
2023-07-06 9:05 ` Maxime Coquelin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).