diff options
author | Matias Elo <matias.elo@nokia.com> | 2021-10-12 10:33:07 +0300 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2021-10-21 10:53:20 +0300 |
commit | f9a858827f7b51c4d936c1f2966f6f34ad0d3530 (patch) | |
tree | bbd24104bd44b8316648295f7f0e6432df6faaed /platform/linux-generic/pktio/null.c | |
parent | 89155e3bbf32fb30813085c04b9ebc68d1dda6b5 (diff) |
linux-gen: pktio: fix conversion overflow build errors
Fix "overflow in conversion from 'int' to 'char' changes value" errors when
building with 'pedantic' option.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'platform/linux-generic/pktio/null.c')
-rw-r--r-- | platform/linux-generic/pktio/null.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/linux-generic/pktio/null.c b/platform/linux-generic/pktio/null.c index cbcde323c..8a421986b 100644 --- a/platform/linux-generic/pktio/null.c +++ b/platform/linux-generic/pktio/null.c @@ -7,6 +7,8 @@ #include <odp_api.h> #include <odp_packet_io_internal.h> +#include <stdint.h> + typedef struct { int promisc; /**< whether promiscuous mode is on */ } pkt_null_t; @@ -116,7 +118,7 @@ static uint32_t null_mtu_get(pktio_entry_t *pktio_entry ODP_UNUSED) return PKTIO_NULL_MTU; } -static const char null_mac[] = {0x02, 0xe9, 0x34, 0x80, 0x73, 0x05}; +static const uint8_t null_mac[] = {0x02, 0xe9, 0x34, 0x80, 0x73, 0x05}; static int null_mac_addr_get(pktio_entry_t *pktio_entry ODP_UNUSED, void *mac_addr) |