Re: [PATCH v3] lib/fib: remove warning about implicit 64-bit conversion

2025-03-04 Thread Andre Muezerie
On Tue, Mar 04, 2025 at 10:47:28AM +, Bruce Richardson wrote: > On Mon, Mar 03, 2025 at 02:54:52PM -0800, Andre Muezerie wrote: > > MSVC issues the warning below: > > > > ../lib/fib/trie.c(341): warning C4334: '<<': > > result of 32-bit shift implicitly converted to 64 bits > > (was 64-bit shi

Re: [PATCH v3] lib/fib: remove warning about implicit 64-bit conversion

2025-03-04 Thread Andre Muezerie
On Mon, Mar 03, 2025 at 10:49:52PM -0800, Stephen Hemminger wrote: > Better to cast the constant (1) to avoid warning, > . > That is what other code does like RTE_BIT macros Alright, I made that change in v4. > > On Mon, Mar 3, 2025, 23:55 Andre Muezerie > wrote: > > > MSVC issues the warning

Re: [PATCH v3] lib/fib: remove warning about implicit 64-bit conversion

2025-03-04 Thread Bruce Richardson
On Mon, Mar 03, 2025 at 02:54:52PM -0800, Andre Muezerie wrote: > MSVC issues the warning below: > > ../lib/fib/trie.c(341): warning C4334: '<<': > result of 32-bit shift implicitly converted to 64 bits > (was 64-bit shift intended?) > > The fix is to cast the result explicitly to uintptr_t since

Re: [PATCH v3] lib/fib: remove warning about implicit 64-bit conversion

2025-03-03 Thread Stephen Hemminger
Better to cast the constant (1) to avoid warning, . That is what other code does like RTE_BIT macros On Mon, Mar 3, 2025, 23:55 Andre Muezerie wrote: > MSVC issues the warning below: > > ../lib/fib/trie.c(341): warning C4334: '<<': > result of 32-bit shift implicitly converted to 64 bits > (was

[PATCH v3] lib/fib: remove warning about implicit 64-bit conversion

2025-03-03 Thread Andre Muezerie
MSVC issues the warning below: ../lib/fib/trie.c(341): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) The fix is to cast the result explicitly to uintptr_t since it is used in pointer arithmetic. Signed-off-by: Andre Muezerie --- lib/fi