Fix errors with updated MSVC in github actions
Subsystems (2)
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
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.
--- lib/rcu/rte_rcu_qsbr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/rcu/rte_rcu_qsbr.h +1 -1
@@ -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
PATCH 2/2 net/ice: disable warning in base code for Windows builds
In reply to Bruce RichardsonDisable 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
@@ -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
Thomas Monjalon
Applied04/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.
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 buildsApplied, thanks.
Note: MSVC is a more accurate cause than Windows.
Very true, good point!