Bluetooth: GATT: Change attribute count from u16_t to size_t
The change changes the type of the attribute count in the bt_gatt_service struct to size_t. The background for the change is that with this variable being a u16_t, we assign something that has been cast to an unsigned long (from "ARRAY_SIZE") to an u16_t variable, and that Lint complains about a loss of information (27 bits to 16 bits in the case I found). (The issue seems to be not only about the cast, but about what is casted. I suspect that Lint may be confused by the magic of ZERO_OR_COMPILE_ERROR.) Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
This commit is contained in:
parent
8e7a00512b
commit
f7a1ffe614
1 changed files with 1 additions and 1 deletions
|
@ -144,7 +144,7 @@ struct bt_gatt_service {
|
|||
/** Service Attributes */
|
||||
struct bt_gatt_attr *attrs;
|
||||
/** Service Attribute count */
|
||||
u16_t attr_count;
|
||||
size_t attr_count;
|
||||
sys_snode_t node;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue