]> sigrok.org Git - libsigrok.git/commitdiff
Avoid serial_write_blocking() warnings.
authorBert Vermeulen <redacted>
Thu, 2 Oct 2014 14:01:27 +0000 (16:01 +0200)
committerBert Vermeulen <redacted>
Thu, 2 Oct 2014 14:01:27 +0000 (16:01 +0200)
src/hardware/agilent-dmm/sched.c
src/hardware/conrad-digi-35-cpu/protocol.c
src/hardware/gmc-mh-1x-2x/protocol.c

index b555cd8b93b4c5a1761f96d518fdf9b8a2454f3a..5e8a968b823dfd482be2dcc5266c55c4250e4b8a 100644 (file)
@@ -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;
        }
index 6b1d0d56af1c8923a5680452625f4983ad5b4640..8068574aa83b780212e83546db35fa7985e31650 100644 (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]);
 
-       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;
        }
index 3ba4f4ffab27565ce72456a8eac4268aacf130c3..53ff9b3be390d497e4b7e98b4329d312a003c979 100644 (file)
@@ -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;
        }