trace: Define externs in a header file
This gets rid of some unnecessary strace warnings from test builds. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
6527b52ead
commit
0e672b89e7
3 changed files with 4 additions and 20 deletions
|
@ -1778,8 +1778,6 @@ done:
|
||||||
static int hostapd_ctrl_test_alloc_fail(struct hostapd_data *hapd, char *cmd)
|
static int hostapd_ctrl_test_alloc_fail(struct hostapd_data *hapd, char *cmd)
|
||||||
{
|
{
|
||||||
#ifdef WPA_TRACE_BFD
|
#ifdef WPA_TRACE_BFD
|
||||||
extern char wpa_trace_fail_func[256];
|
|
||||||
extern unsigned int wpa_trace_fail_after;
|
|
||||||
char *pos;
|
char *pos;
|
||||||
|
|
||||||
wpa_trace_fail_after = atoi(cmd);
|
wpa_trace_fail_after = atoi(cmd);
|
||||||
|
@ -1803,9 +1801,6 @@ static int hostapd_ctrl_get_alloc_fail(struct hostapd_data *hapd,
|
||||||
char *buf, size_t buflen)
|
char *buf, size_t buflen)
|
||||||
{
|
{
|
||||||
#ifdef WPA_TRACE_BFD
|
#ifdef WPA_TRACE_BFD
|
||||||
extern char wpa_trace_fail_func[256];
|
|
||||||
extern unsigned int wpa_trace_fail_after;
|
|
||||||
|
|
||||||
return os_snprintf(buf, buflen, "%u:%s", wpa_trace_fail_after,
|
return os_snprintf(buf, buflen, "%u:%s", wpa_trace_fail_after,
|
||||||
wpa_trace_fail_func);
|
wpa_trace_fail_func);
|
||||||
#else /* WPA_TRACE_BFD */
|
#else /* WPA_TRACE_BFD */
|
||||||
|
@ -1817,8 +1812,6 @@ static int hostapd_ctrl_get_alloc_fail(struct hostapd_data *hapd,
|
||||||
static int hostapd_ctrl_test_fail(struct hostapd_data *hapd, char *cmd)
|
static int hostapd_ctrl_test_fail(struct hostapd_data *hapd, char *cmd)
|
||||||
{
|
{
|
||||||
#ifdef WPA_TRACE_BFD
|
#ifdef WPA_TRACE_BFD
|
||||||
extern char wpa_trace_test_fail_func[256];
|
|
||||||
extern unsigned int wpa_trace_test_fail_after;
|
|
||||||
char *pos;
|
char *pos;
|
||||||
|
|
||||||
wpa_trace_test_fail_after = atoi(cmd);
|
wpa_trace_test_fail_after = atoi(cmd);
|
||||||
|
@ -1842,9 +1835,6 @@ static int hostapd_ctrl_get_fail(struct hostapd_data *hapd,
|
||||||
char *buf, size_t buflen)
|
char *buf, size_t buflen)
|
||||||
{
|
{
|
||||||
#ifdef WPA_TRACE_BFD
|
#ifdef WPA_TRACE_BFD
|
||||||
extern char wpa_trace_test_fail_func[256];
|
|
||||||
extern unsigned int wpa_trace_test_fail_after;
|
|
||||||
|
|
||||||
return os_snprintf(buf, buflen, "%u:%s", wpa_trace_test_fail_after,
|
return os_snprintf(buf, buflen, "%u:%s", wpa_trace_test_fail_after,
|
||||||
wpa_trace_test_fail_func);
|
wpa_trace_test_fail_func);
|
||||||
#else /* WPA_TRACE_BFD */
|
#else /* WPA_TRACE_BFD */
|
||||||
|
|
|
@ -657,6 +657,10 @@ int os_exec(const char *program, const char *arg, int wait_completion);
|
||||||
#if defined(WPA_TRACE_BFD) && defined(CONFIG_TESTING_OPTIONS)
|
#if defined(WPA_TRACE_BFD) && defined(CONFIG_TESTING_OPTIONS)
|
||||||
#define TEST_FAIL() testing_test_fail()
|
#define TEST_FAIL() testing_test_fail()
|
||||||
int testing_test_fail(void);
|
int testing_test_fail(void);
|
||||||
|
extern char wpa_trace_fail_func[256];
|
||||||
|
extern unsigned int wpa_trace_fail_after;
|
||||||
|
extern char wpa_trace_test_fail_func[256];
|
||||||
|
extern unsigned int wpa_trace_test_fail_after;
|
||||||
#else
|
#else
|
||||||
#define TEST_FAIL() 0
|
#define TEST_FAIL() 0
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -8071,8 +8071,6 @@ done:
|
||||||
static int wpas_ctrl_test_alloc_fail(struct wpa_supplicant *wpa_s, char *cmd)
|
static int wpas_ctrl_test_alloc_fail(struct wpa_supplicant *wpa_s, char *cmd)
|
||||||
{
|
{
|
||||||
#ifdef WPA_TRACE_BFD
|
#ifdef WPA_TRACE_BFD
|
||||||
extern char wpa_trace_fail_func[256];
|
|
||||||
extern unsigned int wpa_trace_fail_after;
|
|
||||||
char *pos;
|
char *pos;
|
||||||
|
|
||||||
wpa_trace_fail_after = atoi(cmd);
|
wpa_trace_fail_after = atoi(cmd);
|
||||||
|
@ -8095,9 +8093,6 @@ static int wpas_ctrl_get_alloc_fail(struct wpa_supplicant *wpa_s,
|
||||||
char *buf, size_t buflen)
|
char *buf, size_t buflen)
|
||||||
{
|
{
|
||||||
#ifdef WPA_TRACE_BFD
|
#ifdef WPA_TRACE_BFD
|
||||||
extern char wpa_trace_fail_func[256];
|
|
||||||
extern unsigned int wpa_trace_fail_after;
|
|
||||||
|
|
||||||
return os_snprintf(buf, buflen, "%u:%s", wpa_trace_fail_after,
|
return os_snprintf(buf, buflen, "%u:%s", wpa_trace_fail_after,
|
||||||
wpa_trace_fail_func);
|
wpa_trace_fail_func);
|
||||||
#else /* WPA_TRACE_BFD */
|
#else /* WPA_TRACE_BFD */
|
||||||
|
@ -8109,8 +8104,6 @@ static int wpas_ctrl_get_alloc_fail(struct wpa_supplicant *wpa_s,
|
||||||
static int wpas_ctrl_test_fail(struct wpa_supplicant *wpa_s, char *cmd)
|
static int wpas_ctrl_test_fail(struct wpa_supplicant *wpa_s, char *cmd)
|
||||||
{
|
{
|
||||||
#ifdef WPA_TRACE_BFD
|
#ifdef WPA_TRACE_BFD
|
||||||
extern char wpa_trace_test_fail_func[256];
|
|
||||||
extern unsigned int wpa_trace_test_fail_after;
|
|
||||||
char *pos;
|
char *pos;
|
||||||
|
|
||||||
wpa_trace_test_fail_after = atoi(cmd);
|
wpa_trace_test_fail_after = atoi(cmd);
|
||||||
|
@ -8133,9 +8126,6 @@ static int wpas_ctrl_get_fail(struct wpa_supplicant *wpa_s,
|
||||||
char *buf, size_t buflen)
|
char *buf, size_t buflen)
|
||||||
{
|
{
|
||||||
#ifdef WPA_TRACE_BFD
|
#ifdef WPA_TRACE_BFD
|
||||||
extern char wpa_trace_test_fail_func[256];
|
|
||||||
extern unsigned int wpa_trace_test_fail_after;
|
|
||||||
|
|
||||||
return os_snprintf(buf, buflen, "%u:%s", wpa_trace_test_fail_after,
|
return os_snprintf(buf, buflen, "%u:%s", wpa_trace_test_fail_after,
|
||||||
wpa_trace_test_fail_func);
|
wpa_trace_test_fail_func);
|
||||||
#else /* WPA_TRACE_BFD */
|
#else /* WPA_TRACE_BFD */
|
||||||
|
|
Loading…
Reference in a new issue