[dpdk-dev] [PATCH 43/53] net/sfc/base: fix warnings from VS2015 C compiler (C4310)
Andrew Rybchenko
arybchenko at solarflare.com
Thu Nov 16 09:04:31 CET 2017
From: Andrew Lee <alee at solarflare.com>
Fix level 4 warning
"C4310: cast truncates constant value";
no functional changes.
Fixes: 354df7eadf66 ("net/sfc/base: import bootrom configuration")
Cc: stable at dpdk.org
Signed-off-by: Andrew Lee <alee at solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
---
drivers/net/sfc/base/efx_bootcfg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/sfc/base/efx_bootcfg.c b/drivers/net/sfc/base/efx_bootcfg.c
index c47d16b..660d000 100644
--- a/drivers/net/sfc/base/efx_bootcfg.c
+++ b/drivers/net/sfc/base/efx_bootcfg.c
@@ -356,7 +356,7 @@ efx_bootcfg_read(
rc = efx_bootcfg_verify(enp, (caddr_t)payload, sector_length,
&used_bytes);
if (rc != 0 || used_bytes == 0) {
- payload[0] = (uint8_t)~DHCP_END;
+ payload[0] = (uint8_t)(~DHCP_END & 0xff);
payload[1] = DHCP_END;
used_bytes = 2;
}
--
2.7.4
More information about the dev
mailing list