Skip to content
Snippets Groups Projects
Commit 275d81d4 authored by Daniel Agar's avatar Daniel Agar Committed by Beat Küng
Browse files

stm32 common fix sign-compare

parent 4070abc1
No related branches found
No related tags found
No related merge requests found
......@@ -73,7 +73,7 @@ __EXPORT void board_get_uuid32(uuid_uint32_t uuid_words)
{
uint32_t *chip_uuid = (uint32_t *) STM32_SYSMEM_UID;
for (int i = 0; i < PX4_CPU_UUID_WORD32_LENGTH; i++) {
for (unsigned i = 0; i < PX4_CPU_UUID_WORD32_LENGTH; i++) {
uuid_words[i] = chip_uuid[i];
}
}
......@@ -87,7 +87,7 @@ int board_get_uuid32_formated(char *format_buffer, int size,
int offset = 0;
int sep_size = seperator ? strlen(seperator) : 0;
for (int i = 0; i < PX4_CPU_UUID_WORD32_LENGTH; i++) {
for (unsigned i = 0; i < PX4_CPU_UUID_WORD32_LENGTH; i++) {
offset += snprintf(&format_buffer[offset], size - offset, format, uuid[i]);
if (sep_size && i < PX4_CPU_UUID_WORD32_LENGTH - 1) {
......@@ -104,7 +104,7 @@ int board_get_mfguid(mfguid_t mfgid)
uint32_t *chip_uuid = (uint32_t *) STM32_SYSMEM_UID;
uint32_t *rv = (uint32_t *) &mfgid[0];
for (int i = 0; i < PX4_CPU_UUID_WORD32_LENGTH; i++) {
for (unsigned i = 0; i < PX4_CPU_UUID_WORD32_LENGTH; i++) {
*rv++ = SWAP_UINT32(chip_uuid[(PX4_CPU_UUID_WORD32_LENGTH - 1) - i]);
}
......@@ -118,7 +118,7 @@ int board_get_mfguid_formated(char *format_buffer, int size)
board_get_mfguid(mfguid);
int offset = 0;
for (unsigned int i = 0; i < PX4_CPU_MFGUID_BYTE_LENGTH; i++) {
for (unsigned i = 0; i < PX4_CPU_MFGUID_BYTE_LENGTH; i++) {
offset += snprintf(&format_buffer[offset], size - offset, "%02x", mfguid[i]);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment