[libvirt] [PATCH] util: add missing equal sign in initialization

Ján Tomko posted 1 patch 7 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/b80b0c4517d829cf28fc0b6821351d0faff913fa.1492085628.git.jtomko@redhat.com
src/util/virperf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt] [PATCH] util: add missing equal sign in initialization
Posted by Ján Tomko 7 years ago
Fix the build with clang:
util/virperf.c:86:27: error: use of GNU 'missing =' extension
    in designator [-Werror,-Wgnu-designator]
    [VIR_PERF_EVENT_MBML] {
                          ^
                          =
---
 src/util/virperf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Pushed.

diff --git a/src/util/virperf.c b/src/util/virperf.c
index 9ac27c1..fa5b6cc 100644
--- a/src/util/virperf.c
+++ b/src/util/virperf.c
@@ -83,7 +83,7 @@ static struct virPerfEventAttr attrs[] = {
         .attrType = 0,
         .attrConfig = 2
     },
-    [VIR_PERF_EVENT_MBML] {
+    [VIR_PERF_EVENT_MBML] = {
         .attrType = 0,
         .attrConfig = 3
     },
-- 
2.10.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] util: add missing equal sign in initialization
Posted by Daniel P. Berrange 7 years ago
On Thu, Apr 13, 2017 at 02:14:16PM +0200, Ján Tomko wrote:
> Fix the build with clang:
> util/virperf.c:86:27: error: use of GNU 'missing =' extension
>     in designator [-Werror,-Wgnu-designator]
>     [VIR_PERF_EVENT_MBML] {
>                           ^
>                           =

Fun, I'm suprised gcc allowed this syntax !

> ---
>  src/util/virperf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Pushed.
> 
> diff --git a/src/util/virperf.c b/src/util/virperf.c
> index 9ac27c1..fa5b6cc 100644
> --- a/src/util/virperf.c
> +++ b/src/util/virperf.c
> @@ -83,7 +83,7 @@ static struct virPerfEventAttr attrs[] = {
>          .attrType = 0,
>          .attrConfig = 2
>      },
> -    [VIR_PERF_EVENT_MBML] {
> +    [VIR_PERF_EVENT_MBML] = {
>          .attrType = 0,
>          .attrConfig = 3
>      },
> -- 
> 2.10.2
> 
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list