From: Bert Vermeulen Date: Thu, 2 Oct 2014 14:01:27 +0000 (+0200) Subject: Avoid serial_write_blocking() warnings. X-Git-Tag: libsigrok-0.4.0~894 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=7ce59a31334cdb9b12d9b1c166b542acf1899e00;p=libsigrok.git Avoid serial_write_blocking() warnings. --- diff --git a/src/hardware/agilent-dmm/sched.c b/src/hardware/agilent-dmm/sched.c index b555cd8b..5e8a968b 100644 --- a/src/hardware/agilent-dmm/sched.c +++ b/src/hardware/agilent-dmm/sched.c @@ -140,7 +140,7 @@ static int agdmm_send(const struct sr_dev_inst *sdi, const char *cmd) 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; } diff --git a/src/hardware/conrad-digi-35-cpu/protocol.c b/src/hardware/conrad-digi-35-cpu/protocol.c index 6b1d0d56..8068574a 100644 --- a/src/hardware/conrad-digi-35-cpu/protocol.c +++ b/src/hardware/conrad-digi-35-cpu/protocol.c @@ -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]); - 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; } diff --git a/src/hardware/gmc-mh-1x-2x/protocol.c b/src/hardware/gmc-mh-1x-2x/protocol.c index 3ba4f4ff..53ff9b3b 100644 --- a/src/hardware/gmc-mh-1x-2x/protocol.c +++ b/src/hardware/gmc-mh-1x-2x/protocol.c @@ -1307,7 +1307,7 @@ int req_meas14(const struct sr_dev_inst *sdi) 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; } @@ -1350,7 +1350,7 @@ int req_stat14(const struct sr_dev_inst *sdi, gboolean power_on) /* 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; }