Add casts to fix warnings.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2025-10-12 18:52:07 +02:00
parent eca6807f8e
commit 233e6594c6
20 changed files with 65 additions and 56 deletions

View File

@@ -55,7 +55,7 @@ int phy_serialize_data(const phy_data_t *phy, uint8_t *data, uint16_t *len) {
}
if (phy->usb_product_present) {
*p++ = PHY_USB_PRODUCT;
*p++ = strlen(phy->usb_product) + 1;
*p++ = (uint8_t)strlen(phy->usb_product) + 1;
strcpy((char *)p, phy->usb_product);
p += strlen(phy->usb_product);
*p++ = '\0';
@@ -76,7 +76,7 @@ int phy_serialize_data(const phy_data_t *phy, uint8_t *data, uint16_t *len) {
*p++ = phy->led_driver;
}
*len = p - data;
*len = (uint8_t)(p - data);
return PICOKEY_OK;
}