[PATCH] Fix: Compiler warning on disabled PMKSA_CACHE_EXTERNAL

Felix Fietkau nbd at nbd.name
Wed Dec 14 03:37:45 PST 2016


On 2016-12-14 11:06, Koen Vandeputte wrote:
> Fixes a compiler warning when CONFIG_PMKSA_CACHE_EXTERNAL and
> CONFIG_IEEE8021X_EAPOL are disabled.
> 
> All functions calling these 2 and it's own dependencies
> are embraced by one of these macro's, resulting in the warning when
> disabled.
> 
> ../src/rsn_supp/wpa.c: In function 'wpa_sm_pmksa_cache_head':
> ../src/rsn_supp/wpa.c:3036:9: warning: implicit declaration of function
> 'pmksa_cache_head' [-Wimplicit-function-declaration]
> return pmksa_cache_head(sm->pmksa);
>          ^~~~~~~~~~~~~~~~
> ../src/rsn_supp/wpa.c:3036:9: warning: return makes pointer from integer
> without a cast [-Wint-conversion]
> return pmksa_cache_head(sm->pmksa);
>          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../src/rsn_supp/wpa.c: In function 'wpa_sm_pmksa_cache_add_entry':
> ../src/rsn_supp/wpa.c:3044:9: warning: implicit declaration of function
> 'pmksa_cache_add_entry' [-Wimplicit-function-declaration]
> return pmksa_cache_add_entry(sm->pmksa, entry);
>          ^~~~~~~~~~~~~~~~~~~~~
> ../src/rsn_supp/wpa.c:3044:9: warning: return makes pointer from integer
> without a cast [-Wint-conversion]
> return pmksa_cache_add_entry(sm->pmksa, entry);
>          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
Just sent a slightly better fix for the same issue that simply adds the
missing inline stubs instead of throwing in more #ifdef.
See "[PATCH] Fix build error with IEEE8021X_EAPOL unset"

- Felix



More information about the Hostap mailing list