]> sigrok.org Git - libsigrok.git/commitdiff
scpi-pps: Fix compile warning.
authorBert Vermeulen <redacted>
Mon, 8 Sep 2014 21:31:54 +0000 (23:31 +0200)
committerBert Vermeulen <redacted>
Mon, 8 Sep 2014 21:31:54 +0000 (23:31 +0200)
src/hardware/scpi-pps/api.c

index 5b64f4b622e9b4a5f788b14a00f03f61e56bc620..2f4bdc9308e93e6c36203a43b21529b900f6251a 100644 (file)
@@ -56,7 +56,7 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
        GMatchInfo *model_mi;
        GSList *l;
        uint64_t mask;
-       unsigned int ch_num, ch_idx, old_idx, i, j;
+       unsigned int ch_num, ch_idx, i, j;
        const char *vendor;
        char ch_name[16];
 
@@ -95,7 +95,6 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
        ch_idx = 0;
        for (ch_num = 0; ch_num < device->num_channels; ch_num++) {
                /* Create one channel per measurable output unit. */
-               old_idx = ch_idx;
                for (i = 0; i < ARRAY_SIZE(pci); i++) {
                        if (!scpi_cmd_get(sdi, pci[i].command))
                                continue;
@@ -109,14 +108,6 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
                        ch->priv = pch;
                        sdi->channels = g_slist_append(sdi->channels, ch);
                }
-               if (ch_idx == old_idx) {
-                       /*
-                        * Didn't create any channels for this hardware output.
-                        * This can happen if the device has no measurement capability.
-                        */
-                       g_free(pch);
-                       continue;
-               }
        }
 
        for (i = 0; i < device->num_channel_groups; i++) {