]> sigrok.org Git - libsigrok.git/commitdiff
baylibre-acme: Fix a compiler warning.
authorUwe Hermann <redacted>
Sun, 12 Apr 2015 15:26:48 +0000 (17:26 +0200)
committerUwe Hermann <redacted>
Sun, 12 Apr 2015 15:26:48 +0000 (17:26 +0200)
    CC       src/hardware/baylibre-acme/protocol.lo
  ../src/hardware/baylibre-acme/protocol.c: In function 'bl_acme_set_power_off':
  ../src/hardware/baylibre-acme/protocol.c:417:6: warning: variable 'val' set but not used [-Wunused-but-set-variable]
    int val;
        ^

src/hardware/baylibre-acme/protocol.c

index d0552553feffbebdb298cba9c1c848e0d87de1e8..86fe020b345115690f903345392b38288e5ebe68 100644 (file)
@@ -414,7 +414,6 @@ SR_PRIV int bl_acme_set_power_off(const struct sr_channel_group *cg,
                                  gboolean off)
 {
        struct channel_group_priv *cgp;
-       int val;
 
        cgp = cg->priv;
 
@@ -423,7 +422,7 @@ SR_PRIV int bl_acme_set_power_off(const struct sr_channel_group *cg,
                return SR_ERR_ARG;
        }
 
-       val = sr_gpio_setval_export(pws_gpios[cgp->index], off ? 0 : 1);
+       sr_gpio_setval_export(pws_gpios[cgp->index], off ? 0 : 1);
 
        return SR_OK;
 }