linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] kvm: selftests: add -std=gnu99 cflags
  2018-04-13  0:36 [PATCH] kvm: selftests: add -std=gnu99 cflags Peng Hao
@ 2018-04-12 16:36 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2018-04-12 16:36 UTC (permalink / raw)
  To: Peng Hao, shuah, hofsass; +Cc: linux-kselftest, linux-kernel

On 13/04/2018 02:36, Peng Hao wrote:
> lib/kvm_util.c: In function ‘kvm_memcmp_hva_gva’:
> lib/kvm_util.c:332:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
> 
> So add -std=gnu99 to CFLAGS
> 
> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
> ---
>  tools/testing/selftests/kvm/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile
> index dc44de9..1da541e 100644
> --- a/tools/testing/selftests/kvm/Makefile
> +++ b/tools/testing/selftests/kvm/Makefile
> @@ -14,7 +14,7 @@ LIBKVM += $(LIBKVM_$(UNAME_M))
>  
>  INSTALL_HDR_PATH = $(top_srcdir)/usr
>  LINUX_HDR_PATH = $(INSTALL_HDR_PATH)/include/
> -CFLAGS += -O2 -g -I$(LINUX_HDR_PATH) -Iinclude -I$(<D)
> +CFLAGS += -O2 -g -std=gnu99 -I$(LINUX_HDR_PATH) -Iinclude -I$(<D)
>  
>  # After inclusion, $(OUTPUT) is defined and
>  # $(TEST_GEN_PROGS) starts with $(OUTPUT)/
> 

Queued, thanks.

Paolo

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] kvm: selftests: add -std=gnu99 cflags
@ 2018-04-13  0:36 Peng Hao
  2018-04-12 16:36 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Hao @ 2018-04-13  0:36 UTC (permalink / raw)
  To: shuah, pbonzini, hofsass; +Cc: linux-kselftest, linux-kernel, Peng Hao

lib/kvm_util.c: In function ‘kvm_memcmp_hva_gva’:
lib/kvm_util.c:332:2: error: ‘for’ loop initial declarations are only allowed in C99 mode

So add -std=gnu99 to CFLAGS

Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
---
 tools/testing/selftests/kvm/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile
index dc44de9..1da541e 100644
--- a/tools/testing/selftests/kvm/Makefile
+++ b/tools/testing/selftests/kvm/Makefile
@@ -14,7 +14,7 @@ LIBKVM += $(LIBKVM_$(UNAME_M))
 
 INSTALL_HDR_PATH = $(top_srcdir)/usr
 LINUX_HDR_PATH = $(INSTALL_HDR_PATH)/include/
-CFLAGS += -O2 -g -I$(LINUX_HDR_PATH) -Iinclude -I$(<D)
+CFLAGS += -O2 -g -std=gnu99 -I$(LINUX_HDR_PATH) -Iinclude -I$(<D)
 
 # After inclusion, $(OUTPUT) is defined and
 # $(TEST_GEN_PROGS) starts with $(OUTPUT)/
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-12 16:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-13  0:36 [PATCH] kvm: selftests: add -std=gnu99 cflags Peng Hao
2018-04-12 16:36 ` Paolo Bonzini

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).