From: Uwe Hermann Date: Fri, 10 May 2013 16:30:32 +0000 (+0200) Subject: Drop some lines that are no longer needed. X-Git-Tag: libsigrok-0.2.1~97 X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=decfe89d4e8c0902c1ca56933f2da30b97e9fa72 Drop some lines that are no longer needed. --- diff --git a/hardware/alsa/api.c b/hardware/alsa/api.c index d55b50e7..fd9a3650 100644 --- a/hardware/alsa/api.c +++ b/hardware/alsa/api.c @@ -172,8 +172,6 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi) GVariantBuilder gvb; int i; - (void)sdi; - switch (key) { case SR_CONF_DEVICE_OPTIONS: *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32, diff --git a/hardware/demo/demo.c b/hardware/demo/demo.c index 98c95457..9807edef 100644 --- a/hardware/demo/demo.c +++ b/hardware/demo/demo.c @@ -210,8 +210,6 @@ static GSList *hw_dev_list(void) static int hw_dev_open(struct sr_dev_inst *sdi) { - (void)sdi; - sdi->status = SR_ST_ACTIVE; return SR_OK; @@ -219,9 +217,7 @@ static int hw_dev_open(struct sr_dev_inst *sdi) static int hw_dev_close(struct sr_dev_inst *sdi) { - (void)sdi; - - sdi->status = SR_ST_INACTIVE; + sdi->status = SR_ST_INACTIVE; return SR_OK; } diff --git a/hardware/fluke-dmm/fluke.c b/hardware/fluke-dmm/fluke.c index 2c6451dc..848e03e5 100644 --- a/hardware/fluke-dmm/fluke.c +++ b/hardware/fluke-dmm/fluke.c @@ -35,8 +35,6 @@ static struct sr_datafeed_analog *handle_qm_18x(const struct sr_dev_inst *sdi, char *e, *u; gboolean is_oor; - (void)sdi; - if (strcmp(tokens[0], "QM") || !tokens[1]) return NULL; @@ -159,8 +157,6 @@ static struct sr_datafeed_analog *handle_qm_28x(const struct sr_dev_inst *sdi, float fvalue; char *eptr; - (void)sdi; - if (!tokens[1]) return NULL; diff --git a/hardware/fx2lafw/fx2lafw.c b/hardware/fx2lafw/fx2lafw.c index 91396cbf..738bc4c5 100644 --- a/hardware/fx2lafw/fx2lafw.c +++ b/hardware/fx2lafw/fx2lafw.c @@ -343,7 +343,6 @@ static struct dev_context *fx2lafw_dev_new(void) devc->limit_samples = 0; devc->sample_wide = 0; - return devc; } diff --git a/hardware/hantek-dso/api.c b/hardware/hantek-dso/api.c index 940288e4..2fca660e 100644 --- a/hardware/hantek-dso/api.c +++ b/hardware/hantek-dso/api.c @@ -593,8 +593,6 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi) GVariantBuilder gvb; unsigned int i; - (void)sdi; - if (!sdi) return SR_ERR_ARG; diff --git a/hardware/lascar-el-usb/api.c b/hardware/lascar-el-usb/api.c index e5160856..3809482c 100644 --- a/hardware/lascar-el-usb/api.c +++ b/hardware/lascar-el-usb/api.c @@ -81,8 +81,6 @@ static GSList *hw_scan(GSList *options) GSList *usb_devices, *devices, *l; const char *conn; - (void)options; - drvc = di->priv; conn = NULL; diff --git a/hardware/link-mso19/api.c b/hardware/link-mso19/api.c index c9b56631..16dfe355 100644 --- a/hardware/link-mso19/api.c +++ b/hardware/link-mso19/api.c @@ -67,8 +67,6 @@ static GSList *hw_scan(GSList *options) struct udev *udev; int ptype; - (void)options; - for (l = options; l; l = l->next) { src = l->data; switch (src->key) { diff --git a/hardware/nexus-osciprime/api.c b/hardware/nexus-osciprime/api.c index f2806986..35bf2742 100644 --- a/hardware/nexus-osciprime/api.c +++ b/hardware/nexus-osciprime/api.c @@ -153,8 +153,6 @@ static GSList *hw_scan(GSList *options) int i; const char *conn; - (void)options; - drvc = di->priv; conn = NULL; diff --git a/hardware/openbench-logic-sniffer/api.c b/hardware/openbench-logic-sniffer/api.c index eb7275a3..31f38656 100644 --- a/hardware/openbench-logic-sniffer/api.c +++ b/hardware/openbench-logic-sniffer/api.c @@ -72,8 +72,6 @@ static GSList *scan(GSList *options) const char *conn, *serialcomm; char buf[8]; - (void)options; - drvc = di->priv; devices = NULL; @@ -464,7 +462,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) { - /* Avoid compiler warnings. */ (void)cb_data; abort_acquisition(sdi); diff --git a/hardware/rigol-ds1xx2/protocol.c b/hardware/rigol-ds1xx2/protocol.c index c11006b3..942aecfd 100644 --- a/hardware/rigol-ds1xx2/protocol.c +++ b/hardware/rigol-ds1xx2/protocol.c @@ -43,7 +43,7 @@ SR_PRIV int rigol_ds1xx2_receive(int fd, int revents, void *cb_data) int len, i, waveform_size; struct sr_probe *probe; - (void) fd; + (void)fd; if (!(sdi = cb_data)) return TRUE;