[2/2] test/lcore: fix build with MSVC

Message ID 20250610083643.8466-2-david.marchand@redhat.com (mailing list archive)
State Accepted
Delegated to: David Marchand
Headers
Series [1/2] ci: treat warning as error for MSVC builds in GHA |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/github-robot: build success github build: passed
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-arm64-testing pending Testing pending
ci/iol-unit-amd64-testing fail Testing issues
ci/iol-compile-amd64-testing warning Testing issues
ci/aws-unit-testing success Unit Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

David Marchand June 10, 2025, 8:36 a.m. UTC
MSVC warns about atomic qualifier:
../app/test/test_per_lcore.c(101): error C2220: the following warning is
	treated as an error
../app/test/test_per_lcore.c(101): warning C4090: 'function': different
	'_Atomic' qualifiers

Fixes: 7c37826c2b87 ("test/lcore: fix race in per-lcore test")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_per_lcore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

David Marchand June 11, 2025, 8:46 a.m. UTC | #1
On Tue, Jun 10, 2025 at 10:37 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> MSVC warns about atomic qualifier:
> ../app/test/test_per_lcore.c(101): error C2220: the following warning is
>         treated as an error
> ../app/test/test_per_lcore.c(101): warning C4090: 'function': different
>         '_Atomic' qualifiers
>
> Fixes: 7c37826c2b87 ("test/lcore: fix race in per-lcore test")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>  app/test/test_per_lcore.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/app/test/test_per_lcore.c b/app/test/test_per_lcore.c
> index 9c72f0fa21..e0674b0e70 100644
> --- a/app/test/test_per_lcore.c
> +++ b/app/test/test_per_lcore.c
> @@ -98,7 +98,7 @@ test_per_lcore(void)
>         }
>
>         /* test if it could do remote launch twice at the same time or not */
> -       ret = rte_eal_mp_remote_launch(test_per_lcore_delay, &wait, SKIP_MAIN);
> +       ret = rte_eal_mp_remote_launch(test_per_lcore_delay, RTE_PTR_UNQUAL(&wait), SKIP_MAIN);
>         if (ret < 0) {
>                 printf("It fails to do remote launch but it should able to do\n");
>                 return -1;

Series applied.
  

Patch

diff --git a/app/test/test_per_lcore.c b/app/test/test_per_lcore.c
index 9c72f0fa21..e0674b0e70 100644
--- a/app/test/test_per_lcore.c
+++ b/app/test/test_per_lcore.c
@@ -98,7 +98,7 @@  test_per_lcore(void)
 	}
 
 	/* test if it could do remote launch twice at the same time or not */
-	ret = rte_eal_mp_remote_launch(test_per_lcore_delay, &wait, SKIP_MAIN);
+	ret = rte_eal_mp_remote_launch(test_per_lcore_delay, RTE_PTR_UNQUAL(&wait), SKIP_MAIN);
 	if (ret < 0) {
 		printf("It fails to do remote launch but it should able to do\n");
 		return -1;