mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
syslink fix sign-compare
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user