aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@nokia.com>2023-02-27 17:33:10 +0200
committerPetri Savolainen <petri.savolainen@nokia.com>2023-03-02 12:06:09 +0200
commit0d02df036f5445696df01a1a45246ee60acf3a24 (patch)
tree6a2781019638a1799a11d9a0c9bb1012dd079dec /test
parent1b92a6a21d5cb851b2663652898ba972894810d3 (diff)
test: packet_gen: fix compiler warning
Fixed compiler warning "vlan may be used uninitialized" when building with -Os option. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Diffstat (limited to 'test')
-rw-r--r--test/performance/odp_packet_gen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/performance/odp_packet_gen.c b/test/performance/odp_packet_gen.c
index e02ffe95e..85b0c740b 100644
--- a/test/performance/odp_packet_gen.c
+++ b/test/performance/odp_packet_gen.c
@@ -1312,7 +1312,6 @@ static int init_packets(test_global_t *global, int pktio,
void *data;
uint8_t *u8;
odph_ethhdr_t *eth;
- odph_vlanhdr_t *vlan;
odph_ipv4hdr_t *ip;
odph_udphdr_t *udp;
uint16_t tpid;
@@ -1323,6 +1322,7 @@ static int init_packets(test_global_t *global, int pktio,
uint16_t udp_dst = test_options->udp_dst;
uint32_t udp_src_cnt = 0;
uint32_t udp_dst_cnt = 0;
+ odph_vlanhdr_t *vlan = NULL; /* Fixes bogus compiler warning */
if (num_vlan > MAX_VLANS)
num_vlan = MAX_VLANS;