Merge pull request #116 from olerem/warnings-2016.11.26
authorAdrian Chadd <adrian.chadd@gmail.com>
Sat, 26 Nov 2016 17:55:06 +0000 (09:55 -0800)
committerGitHub <noreply@github.com>
Sat, 26 Nov 2016 17:55:06 +0000 (09:55 -0800)
Warnings 2016.11.26

target_firmware/CMakeLists.txt
target_firmware/wlan/if_ath.c

index e167b36850db3b40192c367530dc6def895bec26..73cb9301776203b1ae4ed7b00d6e3cbbb328e076 100644 (file)
@@ -46,10 +46,10 @@ ADD_DEFINITIONS(
        -Wunused-variable
        -Wunused-value
        -Wpointer-arith
-       -Wundef
        -nostdlib
        -Wundef
        -Wunused-but-set-variable
+       -Wmaybe-uninitialized
 )
 ADD_DEFINITIONS(
        -D_RAM_
index d762989f1f1d50a3b5ea2dbec537a4f0e76262df..b31fbdb67e866d883732f14ca4171515015bbfbd 100755 (executable)
@@ -1098,9 +1098,9 @@ static void ath_enable_intr_tgt(void *Context, A_UINT16 Command,
 {
        struct ath_softc_tgt *sc = (struct ath_softc_tgt *)Context;
        struct ath_hal *ah = sc->sc_ah;
-       a_uint32_t intr;
+       a_uint32_t intr = 0;
 
-       if (data)
+       if (datalen == 4)
                intr = (*(a_uint32_t *)data);
 
        intr = adf_os_ntohl(intr);