Skip to contentSkip to conversation

ci: treat warning as error for MSVC builds in GHA

PATCH In review David Marchand 2 participants 4 messages Jun 10, 2025 – Jun 12, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ci: treat warning as error for MSVC builds in GHA

Some trivial builds warnings with MSVC were missed as those were not treated as errors.

---
 .github/workflows/build.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.github/workflows/build.yml +1 -1
index 1e289979e3..e5f17ef6ac 100644
@@ -198,7 +198,7 @@ jobs:
       shell: cmd
       run: |
         call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64
-        meson setup -Denable_stdatomic=true build
+        meson setup -Denable_stdatomic=true -Dwerror=true build
     - name: Build
       shell: cmd
       run: |
Signature · 1 line
2.49.0
#1 lore raw

PATCH 2/2 test/lcore: fix build with MSVC

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")
---
 app/test/test_per_lcore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test/test_per_lcore.c +1 -1
index 9c72f0fa21..e0674b0e70 100644
@@ -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;
Signature · 1 line
2.49.0
#2 lore raw

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

Quoted 19 lines · David Marchand

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")
---
 app/test/test_per_lcore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test/test_per_lcore.c +0 -0
index 9c72f0fa21..e0674b0e70 100644

app/test/test_per_lcore.c test_per_lcore(void) · line 104

Quoted 8 lines
app/test/test_per_lcore.c +1 -1
@@ -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.

Signature · 1 line
David Marchand
Acked-by on v1 1/2
#3 lore raw
In reply to David Marchand
Quoted 5 lines · David Marchand

Some trivial builds warnings with MSVC were missed as those were not treated as errors.

---

Quoted 16 lines
 .github/workflows/build.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.github/workflows/build.yml +1 -1
index 1e289979e3..e5f17ef6ac 100644
@@ -198,7 +198,7 @@ jobs:
       shell: cmd
       run: |
         call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64
-        meson setup -Denable_stdatomic=true build
+        meson setup -Denable_stdatomic=true -Dwerror=true build
     - name: Build
       shell: cmd
       run: |