]> sigrok.org Git - libsigrok.git/commitdiff
asix-sigma: Fix two compiler warnings.
authorUwe Hermann <redacted>
Mon, 31 Dec 2012 20:21:39 +0000 (21:21 +0100)
committerUwe Hermann <redacted>
Mon, 31 Dec 2012 20:21:39 +0000 (21:21 +0100)
asix-sigma.c:648:9: warning: 'ret' may be used uninitialized in this
function [-Wmaybe-uninitialized]

asix-sigma.c:1337:20: warning: 'triggerselect' may be used uninitialized
in this function [-Wmaybe-uninitialized]

hardware/asix-sigma/asix-sigma.c

index 27a91226a9c431e8765391a6918c43d473da62cb..8ff2e159101a79386603f6e7c1a1a83895c3ccb7 100644 (file)
@@ -648,6 +648,8 @@ static int set_samplerate(const struct sr_dev_inst *sdi, uint64_t samplerate)
        int i, ret;
        struct dev_context *devc = sdi->priv;
 
+       ret = SR_OK;
+
        for (i = 0; supported_samplerates[i]; i++) {
                if (supported_samplerates[i] == samplerate)
                        break;
@@ -1278,7 +1280,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
        struct sr_datafeed_meta_logic meta;
        struct clockselect_50 clockselect;
        int frac, triggerpin, ret;
-       uint8_t triggerselect;
+       uint8_t triggerselect = 0;
        struct triggerinout triggerinout_conf;
        struct triggerlut lut;