Move extern declarations for ext_password backends into a header file

This gets rid of a sparse warning and also allows the compatibility of
the declarations to be verified (a missing const declaration is fixed
here as well).

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2016-06-24 17:30:26 +03:00
parent affdd33591
commit 82ffcba755
2 changed files with 6 additions and 4 deletions

View file

@ -16,10 +16,6 @@
#include "ext_password_i.h" #include "ext_password_i.h"
#ifdef CONFIG_EXT_PASSWORD_TEST
extern struct ext_password_backend ext_password_test;
#endif /* CONFIG_EXT_PASSWORD_TEST */
static const struct ext_password_backend *backends[] = { static const struct ext_password_backend *backends[] = {
#ifdef CONFIG_EXT_PASSWORD_TEST #ifdef CONFIG_EXT_PASSWORD_TEST
&ext_password_test, &ext_password_test,

View file

@ -20,4 +20,10 @@ struct ext_password_backend {
struct wpabuf * ext_password_alloc(size_t len); struct wpabuf * ext_password_alloc(size_t len);
/* Available ext_password backends */
#ifdef CONFIG_EXT_PASSWORD_TEST
extern const struct ext_password_backend ext_password_test;
#endif /* CONFIG_EXT_PASSWORD_TEST */
#endif /* EXT_PASSWORD_I_H */ #endif /* EXT_PASSWORD_I_H */