Skip to contentSkip to conversation

Fix errors with updated MSVC in github actions

PATCH Applied Bruce Richardson 2 participants 5 messages Dec 4, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Fix errors with updated MSVC in github actions

The version of MSVC in our github CI has been updated so new warnings are appearing about "zero extending 'unsigned long' to 'uint64_t' of greater size." These two patches ensure that the build in github is clean again.

Bruce Richardson (2):
rcu: fix warning on Windows builds
net/ice: disable warning in base code for Windows builds

 drivers/net/intel/ice/base/meson.build | 1 +
 lib/rcu/rte_rcu_qsbr.h                 | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

--
2.51.0

#1 lore raw

PATCH 1/2 rcu: fix warning on Windows builds

Within github actions, the following error can be reported:

...\rte_rcu_qsbr.h(566): error C2220: the following warning is treated as an error ...\rte_rcu_qsbr.h(566): warning C4319: '~': zero extending 'unsigned long' to 'uint64_t' of greater size

To fix this, replace the "1UL" with RTE_BIT64 to force a 64-bit value on all platforms.

Fixes 64994b56cfd7 ("rcu: add RCU library supporting QSBR mechanism")
---
 lib/rcu/rte_rcu_qsbr.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/rcu/rte_rcu_qsbr.h +1 -1
index 550fadf56a..d89a43c186 100644
@@ -563,7 +563,7 @@ __rte_rcu_qsbr_check_selective(struct rte_rcu_qsbr *v, uint64_t t, bool wait)
 			if (c != __RTE_QSBR_CNT_THR_OFFLINE && acked_token > c)
 				acked_token = c;
 
-			bmap &= ~(1UL << j);
+			bmap &= ~RTE_BIT64(j);
 		}
 	}
 
Signature · 1 line
2.51.0
#2 lore raw

PATCH 2/2 net/ice: disable warning in base code for Windows builds

In reply to Bruce Richardson

Disable warning about "zero extending 'unsigned long' to 'u64' of greater size" in base code builds.

---
 drivers/net/intel/ice/base/meson.build | 1 +
 1 file changed, 1 insertion(+)
drivers/net/intel/ice/base/meson.build +1 -0
index f46dbb265f..fd079c41cf 100644
@@ -35,6 +35,7 @@ if is_ms_compiler
     error_cflags = [
             '/wd4101', # unreferenced local variable
             '/wd4334', # result of 32-bit shift implicitly converted to 64 bits
+            '/wd4319', # zero extending 'unsigned long' to 'u64' of greater size
     ]
 else
     error_cflags = [
Signature · 1 line
2.51.0
#3 lore raw
In reply to Bruce Richardson

04/12/2025 12:29, Bruce Richardson:

Quoted 8 lines

The version of MSVC in our github CI has been updated so new warnings are appearing about "zero extending 'unsigned long' to 'uint64_t' of greater size." These two patches ensure that the build in github is clean again.

Bruce Richardson (2):
rcu: fix warning on Windows builds
net/ice: disable warning in base code for Windows builds

Applied, thanks.

Note: MSVC is a more accurate cause than Windows.

#4 lore raw
Quoted 6 lines · Thomas Monjalon

04/12/2025 12:29, Bruce Richardson:

Quoted 5 lines

The version of MSVC in our github CI has been updated so new warnings are appearing about "zero extending 'unsigned long' to 'uint64_t' of greater size." These two patches ensure that the build in github is clean again.

Quoted 8 lines
Quoted 3 lines

Bruce Richardson (2):
rcu: fix warning on Windows builds
net/ice: disable warning in base code for Windows builds

Applied, thanks.

Note: MSVC is a more accurate cause than Windows.

Very true, good point!