From: Uwe Hermann Date: Tue, 25 Mar 2014 20:35:31 +0000 (+0100) Subject: Various drivers: Drop some unneeded lines. X-Git-Tag: libsigrok-0.3.0~100 X-Git-Url: http://sigrok.org/gitweb/?a=commitdiff_plain;h=8bd3daa48ad3c5e043fc9f468144f9a455ad80ce;p=libsigrok.git Various drivers: Drop some unneeded lines. --- diff --git a/hardware/cem-dt-885x/api.c b/hardware/cem-dt-885x/api.c index 1b56227e..34853a0c 100644 --- a/hardware/cem-dt-885x/api.c +++ b/hardware/cem-dt-885x/api.c @@ -405,8 +405,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) { - (void)cb_data; - if (sdi->status != SR_ST_ACTIVE) return SR_ERR_DEV_CLOSED; diff --git a/hardware/gmc-mh-1x-2x/api.c b/hardware/gmc-mh-1x-2x/api.c index ec12ab2f..09ed9c15 100644 --- a/hardware/gmc-mh-1x-2x/api.c +++ b/hardware/gmc-mh-1x-2x/api.c @@ -428,14 +428,10 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi, int ret; struct dev_context *devc; - (void)sdi; - (void)data; (void)cg; ret = SR_OK; - (void)cg; - if (!sdi || !(devc = sdi->priv)) return SR_ERR_ARG; @@ -447,7 +443,6 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi, case SR_CONF_LIMIT_MSEC: *data = g_variant_new_uint64(devc->limit_msec); break; - case SR_CONF_POWER_OFF: *data = g_variant_new_boolean(FALSE); break; @@ -481,8 +476,6 @@ static int config_list_common(int key, GVariant **data, const struct sr_dev_inst static int config_list_sm(int key, GVariant **data, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) { - (void)sdi; - switch (key) { case SR_CONF_DEVICE_OPTIONS: *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32, @@ -499,8 +492,6 @@ static int config_list_sm(int key, GVariant **data, const struct sr_dev_inst *sd static int config_list_bd(int key, GVariant **data, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) { - (void)sdi; - switch (key) { case SR_CONF_DEVICE_OPTIONS: *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32, diff --git a/hardware/norma-dmm/api.c b/hardware/norma-dmm/api.c index 13a40512..6860a783 100644 --- a/hardware/norma-dmm/api.c +++ b/hardware/norma-dmm/api.c @@ -250,9 +250,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, struct dev_context *devc; struct sr_serial_dev_inst *serial; - (void)sdi; - (void)cb_data; - if (!sdi || !cb_data || !(devc = sdi->priv)) return SR_ERR_BUG; diff --git a/hardware/uni-t-dmm/api.c b/hardware/uni-t-dmm/api.c index 0ab3152b..ef31de04 100644 --- a/hardware/uni-t-dmm/api.c +++ b/hardware/uni-t-dmm/api.c @@ -257,8 +257,6 @@ static int dev_open(struct sr_dev_inst *sdi, int dmm) static int dev_close(struct sr_dev_inst *sdi) { - (void)sdi; - /* TODO */ sdi->status = SR_ST_INACTIVE; diff --git a/hardware/uni-t-ut32x/protocol.c b/hardware/uni-t-ut32x/protocol.c index 95323a67..863f9fa8 100644 --- a/hardware/uni-t-ut32x/protocol.c +++ b/hardware/uni-t-ut32x/protocol.c @@ -203,6 +203,7 @@ SR_PRIV int uni_t_ut32x_handle_events(int fd, int revents, void *cb_data) (void)fd; (void)revents; + drvc = di->priv; if (!(sdi = cb_data))