syslink fix sign-compare

This commit is contained in:
Daniel Agar
2017-07-29 19:08:30 -04:00
committed by Beat Küng
parent 33ee4fc453
commit d4502349fb
2 changed files with 3 additions and 3 deletions

View File

@@ -118,7 +118,7 @@ int syslink_parse_char(syslink_parse_state *state, char c, syslink_message_t *ms
state->index++;
if (state->index >= sizeof(msg->cksum)) {
if (state->index >= (int)sizeof(msg->cksum)) {
state->state = SYSLINK_STATE_START;
state->index = 0;
return 1;

View File

@@ -705,7 +705,7 @@ Syslink::send_bytes(const void *data, size_t len)
// TODO: This could be way more efficient
// Using interrupts/DMA/polling would be much better
for (int i = 0; i < len; i++) {
for (size_t i = 0; i < len; i++) {
// Block until we can send a byte
while (px4_arch_gpioread(GPIO_NRF_TXEN)) ;
@@ -804,7 +804,7 @@ void status()
printf(", VID: %02X , PID: %02X\n", desc.header, desc.vendorId, desc.productId);
// Print pages of memory
for (int di = 0; di < sizeof(desc); di++) {
for (size_t di = 0; di < sizeof(desc); di++) {
if (di % 16 == 0) {
printf("\n");
}