]> The Tcpdump Group git mirrors - libpcap/commitdiff
Squelch a compiler warning.
authorGuy Harris <[email protected]>
Tue, 19 Sep 2017 23:04:47 +0000 (16:04 -0700)
committerGuy Harris <[email protected]>
Tue, 19 Sep 2017 23:04:47 +0000 (16:04 -0700)
b_vid will be set in all code paths where it's used, but not all
compilers do a sophisticated enough dataflow analysis to realize that.

gencode.c

index 5a91747d88b6cd76e4c9678d121e9fe6f974ed30..e0c327dc31c3c79a9bae4bf28b5353d8444b88ce 100644 (file)
--- a/gencode.c
+++ b/gencode.c
@@ -8125,7 +8125,7 @@ gen_vlan_patch_vid_test(compiler_state_t *cstate, struct block *b_vid)
 static struct block *
 gen_vlan_bpf_extensions(compiler_state_t *cstate, int vlan_num)
 {
-        struct block *b0, *b_tpid, *b_vid;
+        struct block *b0, *b_tpid, *b_vid = NULL;
         struct slist *s;
 
         /* generate new filter code based on extracting packet