Anonymous
Not applicable
Jun 10, 2018
10:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 10, 2018
10:30 PM
What does this line of code do? (void)<variable>;
Below is an example:
case CYBLE_EVT_GAP_AUTH_COMPLETE:
authInfo = (CYBLE_GAP_AUTH_INFO_T *)eventParam;
(void)authInfo;
DBG_PRINTF("AUTH_COMPLETE: security:%x, bonding:%x, ekeySize:%x, authErr %x \r\n",
authInfo->security, authInfo->bonding, authInfo->ekeySize, authInfo->authErr);
break;
- Tags:
- void
2 Replies
Anonymous
Not applicable
Jun 11, 2018
11:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 11, 2018
11:57 PM
Hello,
(void)authInfo; This is added to avoid any compiler warnings in case if the authInfo is unused in your code.
This not any specific requirement for the BLE design.
Thanks,
Ranjith
Jun 12, 2018
04:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 12, 2018
04:31 AM