Message ID | 20220726083725.32454-1-pbonzini@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [kvm-unit-tests] s390x: fix build with clang | expand |
On 26/07/2022 10.37, Paolo Bonzini wrote: > Reported by Travis CI: > > /home/travis/build/kvm-unit-tests/kvm-unit-tests/lib/s390x/fault.c:43:56: error: static_assert with no message is a C++17 extension [-Werror,-Wc++17-extensions] > _Static_assert(ARRAY_SIZE(prot_str) == PROT_NUM_CODES); > ^ > , "" > 1 error generated. > make: *** [<builtin>: lib/s390x/fault.o] Error 1 > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > --- > lib/s390x/fault.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/s390x/fault.c b/lib/s390x/fault.c > index 1cd6e26..a882d5d 100644 > --- a/lib/s390x/fault.c > +++ b/lib/s390x/fault.c > @@ -40,7 +40,7 @@ static void print_decode_pgm_prot(union teid teid) > "LAP", > "IEP", > }; > - _Static_assert(ARRAY_SIZE(prot_str) == PROT_NUM_CODES); > + _Static_assert(ARRAY_SIZE(prot_str) == PROT_NUM_CODES, "ESOP2 prot codes"); > int prot_code = teid_esop2_prot_code(teid); > > printf("Type: %s\n", prot_str[prot_code]); Reviewed-by: Thomas Huth <thuth@redhat.com>
On Tue, 26 Jul 2022 10:37:25 +0200 Paolo Bonzini <pbonzini@redhat.com> wrote: > Reported by Travis CI: > > /home/travis/build/kvm-unit-tests/kvm-unit-tests/lib/s390x/fault.c:43:56: error: static_assert with no message is a C++17 extension [-Werror,-Wc++17-extensions] > _Static_assert(ARRAY_SIZE(prot_str) == PROT_NUM_CODES); > ^ > , "" > 1 error generated. > make: *** [<builtin>: lib/s390x/fault.o] Error 1 > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> > --- > lib/s390x/fault.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/s390x/fault.c b/lib/s390x/fault.c > index 1cd6e26..a882d5d 100644 > --- a/lib/s390x/fault.c > +++ b/lib/s390x/fault.c > @@ -40,7 +40,7 @@ static void print_decode_pgm_prot(union teid teid) > "LAP", > "IEP", > }; > - _Static_assert(ARRAY_SIZE(prot_str) == PROT_NUM_CODES); > + _Static_assert(ARRAY_SIZE(prot_str) == PROT_NUM_CODES, "ESOP2 prot codes"); > int prot_code = teid_esop2_prot_code(teid); > > printf("Type: %s\n", prot_str[prot_code]);
diff --git a/lib/s390x/fault.c b/lib/s390x/fault.c index 1cd6e26..a882d5d 100644 --- a/lib/s390x/fault.c +++ b/lib/s390x/fault.c @@ -40,7 +40,7 @@ static void print_decode_pgm_prot(union teid teid) "LAP", "IEP", }; - _Static_assert(ARRAY_SIZE(prot_str) == PROT_NUM_CODES); + _Static_assert(ARRAY_SIZE(prot_str) == PROT_NUM_CODES, "ESOP2 prot codes"); int prot_code = teid_esop2_prot_code(teid); printf("Type: %s\n", prot_str[prot_code]);
Reported by Travis CI: /home/travis/build/kvm-unit-tests/kvm-unit-tests/lib/s390x/fault.c:43:56: error: static_assert with no message is a C++17 extension [-Werror,-Wc++17-extensions] _Static_assert(ARRAY_SIZE(prot_str) == PROT_NUM_CODES); ^ , "" 1 error generated. make: *** [<builtin>: lib/s390x/fault.o] Error 1 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- lib/s390x/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)