Avoid serial_write_blocking() warnings.

This commit is contained in:
Bert Vermeulen 2014-10-02 16:01:27 +02:00
parent 081c214eac
commit 7ce59a3133
3 changed files with 4 additions and 4 deletions

View File

@ -140,7 +140,7 @@ static int agdmm_send(const struct sr_dev_inst *sdi, const char *cmd)
strcat(buf, "\r\n"); strcat(buf, "\r\n");
else else
strcat(buf, "\n\r\n"); 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."); sr_err("Failed to send.");
return SR_ERR; return SR_ERR;
} }

View File

@ -48,7 +48,7 @@ SR_PRIV int send_msg1(const struct sr_dev_inst *sdi, char cmd, int param)
sr_spew("send_msg1(): %c%c%c%c\\r", buf[0], buf[1], buf[2], buf[3]); 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); sr_err("Write error for cmd=%c", cmd);
return SR_ERR; return SR_ERR;
} }

View File

@ -1307,7 +1307,7 @@ int req_meas14(const struct sr_dev_inst *sdi)
devc->cmd_idx = 0; devc->cmd_idx = 0;
create_cmd_14(devc->addr, 8, params, msg); create_cmd_14(devc->addr, 8, params, msg);
devc->req_sent_at = g_get_monotonic_time(); 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; return SR_ERR;
} }
@ -1350,7 +1350,7 @@ int req_stat14(const struct sr_dev_inst *sdi, gboolean power_on)
/* Write message and wait for reply */ /* Write message and wait for reply */
devc->req_sent_at = g_get_monotonic_time(); 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; return SR_ERR;
} }