]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Resolve some sparse warnings
authorJouni Malinen <j@w1.fi>
Tue, 24 Nov 2009 22:57:00 +0000 (00:57 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 24 Nov 2009 22:57:00 +0000 (00:57 +0200)
Mainly, this is including header files to get definitions for functions
which is good to verify that the parameters match. None of these are
issues that would have shown as incorrect behavior of the program.

src/crypto/aes-cbc.c
src/crypto/aes-ctr.c
src/crypto/aes-encblock.c
src/crypto/aes-omac1.c
src/crypto/aes-unwrap.c
src/crypto/crypto_openssl.c
src/drivers/driver_nl80211.c
src/wps/ndef.c
src/wps/wps_registrar.c
src/wps/wps_ufd.c

index 4e4cd7f91b9c01ec8b08f32594784b792f5b46f5..bd74769905e14e9669c0759bd2f4f69bd2af8556 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "common.h"
 #include "aes.h"
+#include "aes_wrap.h"
 
 /**
  * aes_128_cbc_encrypt - AES-128 CBC encryption
index 997f4282b02096698a1420ac9f8ec500d63b3532..468f8774119971ed1bcc31a76c2cc531990eb7b9 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "common.h"
 #include "aes.h"
+#include "aes_wrap.h"
 
 /**
  * aes_128_ctr_encrypt - AES-128 CTR mode encryption
index a1d56f54ff4443f9447b534e1bdda96862eda3be..8f35caa221e25b01158b2390e00d936fbac94675 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "common.h"
 #include "aes.h"
+#include "aes_wrap.h"
 
 /**
  * aes_128_encrypt_block - Perform one AES 128-bit block operation
index d9712b5205878d91010ed12f2dee2368257cf2c1..f77529617a31c3e96b30176b20d833070c153679 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "common.h"
 #include "aes.h"
+#include "aes_wrap.h"
 
 static void gf_mulx(u8 *pad)
 {
index afaa47a28478d24c0e2760ef5528d9d8cbbb3396..f233ffa4c04cd072499e14800f399fb6f33009d0 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "common.h"
 #include "aes.h"
+#include "aes_wrap.h"
 
 /**
  * aes_unwrap - Unwrap key with AES Key Wrap Algorithm (128-bit KEK) (RFC3394)
index 93d7b59ad99e3340f11dd58cce01ddfa7efd7d48..e1fcf471c1289b1ea49317fee67fbd4cdd324ba2 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "common.h"
 #include "wpabuf.h"
+#include "dh_group5.h"
 #include "crypto.h"
 
 #if OPENSSL_VERSION_NUMBER < 0x00907000
index 129bf0928e1eb320499199254067ce4e6b2e9d40..ad279a19da57b61313c74b624d23997b4cd8d260 100644 (file)
@@ -1701,7 +1701,7 @@ wpa_driver_nl80211_get_scan_results(void *priv)
 
        res = os_zalloc(sizeof(*res));
        if (res == NULL)
-               return 0;
+               return NULL;
        msg = nlmsg_alloc();
        if (!msg)
                goto nla_put_failure;
index f900767b595822010ce5d6c537ec99e2d1b3f507..9baec7f4b27c22c0d7504ed7d865f3ce7b03d0b3 100644 (file)
@@ -16,6 +16,7 @@
 #include "includes.h"
 #include "common.h"
 #include "wps/wps.h"
+#include "wps/wps_i.h"
 
 #define FLAG_MESSAGE_BEGIN (1 << 7)
 #define FLAG_MESSAGE_END (1 << 6)
index edd4b5abfe1c46327733fabbffc61ea093659e8a..2dad278aedaa8c2ddef8a013c9b854ed2143ceaa 100644 (file)
@@ -1139,7 +1139,7 @@ static int wps_build_cred_encr_type(struct wpabuf *msg,
 
 
 static int wps_build_cred_network_key(struct wpabuf *msg,
-                                     const const struct wps_credential *cred)
+                                     const struct wps_credential *cred)
 {
        wpa_printf(MSG_DEBUG, "WPS:  * Network Key");
        wpabuf_put_be16(msg, ATTR_NETWORK_KEY);
index 0e713eeeecf3c023bc68b5e78ec20851746833de..1a911e1d4ceb23975e3b45e130b87e896a3906c6 100644 (file)
@@ -21,6 +21,7 @@
 #include <dirent.h>
 
 #include "wps/wps.h"
+#include "wps/wps_i.h"
 
 #ifdef CONFIG_NATIVE_WINDOWS
 #define UFD_DIR1 "%s\\SMRTNTKY"