kernel: Fix -Wmaybe-unitialized
authorJohn Marino <draco@marino.st>
Wed, 11 Feb 2015 01:51:05 +0000 (02:51 +0100)
committerJohn Marino <draco@marino.st>
Wed, 11 Feb 2015 01:56:52 +0000 (02:56 +0100)
Likely there was never a bug here, so explicitly initializing won't
make a difference other than make gcc 5.0 happy.

sys/dev/raid/twe/twe.c
sys/net/pf/pf.c

index 5b4b824..871e3c2 100644 (file)
@@ -1651,6 +1651,8 @@ twe_describe_controller(struct twe_softc *sc)
 
     TWE_IO_LOCK(sc);
 
+    ports = 0;
+    size = 0;
     /* get the port count */
     twe_get_param_1(sc, TWE_PARAM_CONTROLLER, TWE_PARAM_CONTROLLER_PortCount, &ports);
 
index cfc8ac6..0cc306e 100644 (file)
@@ -5123,8 +5123,8 @@ pf_test_state_icmp(struct pf_state **state, int direction, struct pfi_kif *kif,
                   u_short *reason)
 {
        struct pf_addr  *saddr = pd->src, *daddr = pd->dst;
-       u_int16_t        icmpid = 0, *icmpsum;
-       u_int8_t         icmptype;
+       u_int16_t        icmpid = 0, *icmpsum = NULL;
+       u_int8_t         icmptype = 0;
        int              state_icmp = 0;
        int              error;
        struct pf_state_key_cmp key;