Compile error when SUPPLICANT_DEBUG is enabled

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
AxLi_1746341
Level 7
Level 7
10 comments on KBA 5 comments on KBA First comment on KBA

Uncomment below lines in include/wiced_defaults.h then build fails:

#define WPRINT_ENABLE_SUPPLICANT_INFO

#define WPRINT_ENABLE_SUPPLICANT_DEBUG

#define WPRINT_ENABLE_SUPPLICANT_ERROR

0 Likes
1 Solution
GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

The error occurs because the functions wwd_event_to_string(), wwd_status_to_string(), wwd_reason_to_string() are not defined in wiced_supplicant.c. They are defined in wwd_wifi.c. As a workaround, comment the SUPPLICANT_DEBUG(("[%s()] : L%d : Event type = [%s], Status = [%s], Reason = [%s]\n", __FUNCTION__, __LINE__, wwd_event_to_string(event_header->event_type),

                wwd_status_to_string(event_header->status), wwd_reason_to_string(event_header->reason) )) statement in supplicant_external_event_handler(). We will look into this issue.

View solution in original post

0 Likes
2 Replies
GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

The error occurs because the functions wwd_event_to_string(), wwd_status_to_string(), wwd_reason_to_string() are not defined in wiced_supplicant.c. They are defined in wwd_wifi.c. As a workaround, comment the SUPPLICANT_DEBUG(("[%s()] : L%d : Event type = [%s], Status = [%s], Reason = [%s]\n", __FUNCTION__, __LINE__, wwd_event_to_string(event_header->event_type),

                wwd_status_to_string(event_header->status), wwd_reason_to_string(event_header->reason) )) statement in supplicant_external_event_handler(). We will look into this issue.

0 Likes

I know the problem and I know how to fix it.

The problem is these functions are static functions that can only be accessed by wwd_wifi.c.

In additional, these function are only available when WPRINT_ENABLE_WWD_DEBUG is defined.

So you will hit compile error if SUPPLICANT_DEBUG is enabled but WPRINT_ENABLE_WWD_DEBUG is not defined.

The fix should be simple, I reported it here so you can make it work out-of-box in next release.

0 Likes