strcat(buf, "\r\n");
else
strcat(buf, "\n\r\n");
- if (serial_write_blocking(serial, buf, strlen(buf)) < strlen(buf)) {
+ if (serial_write_blocking(serial, buf, strlen(buf)) < (int)strlen(buf)) {
sr_err("Failed to send.");
return SR_ERR;
}
sr_spew("send_msg1(): %c%c%c%c\\r", buf[0], buf[1], buf[2], buf[3]);
- if (serial_write_blocking(serial, buf, sizeof(buf)) < sizeof(buf)) {
+ if (serial_write_blocking(serial, buf, sizeof(buf)) < (int)sizeof(buf)) {
sr_err("Write error for cmd=%c", cmd);
return SR_ERR;
}
devc->cmd_idx = 0;
create_cmd_14(devc->addr, 8, params, msg);
devc->req_sent_at = g_get_monotonic_time();
- if (serial_write_blocking(serial, msg, sizeof(msg)) < sizeof(msg)) {
+ if (serial_write_blocking(serial, msg, sizeof(msg)) < (int)sizeof(msg)) {
return SR_ERR;
}
/* Write message and wait for reply */
devc->req_sent_at = g_get_monotonic_time();
- if (serial_write_blocking(serial, msg, sizeof(msg)) < sizeof(msg)) {
+ if (serial_write_blocking(serial, msg, sizeof(msg)) < (int)sizeof(msg)) {
return SR_ERR;
}