This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-CC1352R1: When using example code from the SimpleLink Academy / Bluetooth 5 section, I get warnings I do not understand.

Part Number: LAUNCHXL-CC1352R1

The SimpleLink Academy shows us to use code like this for our xxxService_ReadAttrCB function:

if ( ! memcmp(pAttr->type.uuid, myCoolCharUuid, pAttr->type.len) ) {

.....

}

See this link: http://dev.ti.com/tirex/explore/node?node=AETVcTRqok2cbWCjbdtG5w__pTTHBmu__LATEST

Go down to the GATT Server Callbacks section and look at the non-minimal implementation of myService_ReadAttrCB.

When I do this, I get two warnings on the if statement:

"../Application/services/RaceControlService.c", line 333: warning #169-D: argument of type "int" is incompatible with parameter of type "const void *

"../Application/services/RaceControlService.c", line 333: warning #154-D: conversion of nonzero integer to pointer

How can I get rid of these warnings?

Unrelated question: Are tags on our E2E questions important? If so, how can I make them useful?

  • Hi Clark,

    I believe you get the warning because 'myCoolCharUuid' is not a byte array address or integer pointer type. If you convert 'myCoolCharUuid' to an array or integer pointer, the warnings should go away.

    Tags are helpful for us to determine general information and categorization of the post. As long as key information is tagged such as device, Bluetooth stack, and topic-related tags, that should be fine!

    Regards,
    Michael