]> sigrok.org Git - libsigrok.git/blobdiff - src/scpi/scpi.c
Fix a few "value never read" scan-build warnings.
[libsigrok.git] / src / scpi / scpi.c
index 9b5b1ea91685716d0b5e2f1bd6cc180ad7d1a96a..0efde8bab7b9c11f8d2cec00ee48f1afd0ecac4f 100644 (file)
@@ -210,7 +210,7 @@ SR_PRIV struct sr_scpi_dev_inst *scpi_dev_inst_new(struct drv_context *drvc,
  */
 SR_PRIV int sr_scpi_open(struct sr_scpi_dev_inst *scpi)
 {
-       return scpi->open(scpi->priv);
+       return scpi->open(scpi);
 }
 
 /**
@@ -352,7 +352,7 @@ SR_PRIV int sr_scpi_read_complete(struct sr_scpi_dev_inst *scpi)
  */
 SR_PRIV int sr_scpi_close(struct sr_scpi_dev_inst *scpi)
 {
-       return scpi->close(scpi->priv);
+       return scpi->close(scpi);
 }
 
 /**
@@ -607,7 +607,6 @@ SR_PRIV int sr_scpi_get_floatv(struct sr_scpi_dev_inst *scpi,
        gchar **ptr, **tokens;
        GArray *response_array;
 
-       ret = SR_OK;
        response = NULL;
        tokens = NULL;
 
@@ -664,7 +663,6 @@ SR_PRIV int sr_scpi_get_uint8v(struct sr_scpi_dev_inst *scpi,
        gchar **ptr, **tokens;
        GArray *response_array;
 
-       ret = SR_OK;
        response = NULL;
        tokens = NULL;