]> sigrok.org Git - libsigrok.git/commit - src/hardware/rigol-ds/api.c
Fix a few "value never read" scan-build warnings.
authorUwe Hermann <redacted>
Fri, 25 Sep 2015 06:52:58 +0000 (08:52 +0200)
committerUwe Hermann <redacted>
Fri, 25 Sep 2015 10:02:42 +0000 (12:02 +0200)
commite57057aee778e723da572a6b5e2bd01526cc7beb
treefe1d7a9fce35ee41b2038fd04dfb20c88a4f9b07
parent36cbd69e12d8957592c94420d98552bb00d67be6
Fix a few "value never read" scan-build warnings.

This fixes parts of bug #423.

The list of fixed warnings:

src/output/srzip.c:285:3: warning: Value stored to 'ret' is never read
                ret = zip_append(o, logic->data, logic->unitsize, logic->length);
                ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/scpi/scpi.c:610:2: warning: Value stored to 'ret' is never read
        ret = SR_OK;
        ^     ~~~~~
src/scpi/scpi.c:667:2: warning: Value stored to 'ret' is never read
        ret = SR_OK;
        ^     ~~~~~
src/dmm/vc870.c:410:2: warning: Value stored to 'info_local' is never read
        info_local = (struct vc870_info *)info;
        ^            ~~~~~~~~~~~~~~~~~~~~~~~~~
src/hardware/conrad-digi-35-cpu/api.c:130:2: warning: Value stored to 'ret' is never read
        ret = SR_OK;
        ^     ~~~~~
src/hardware/fx2lafw/api.c:658:2: warning: Value stored to 'timeout' is never read
        timeout = fx2lafw_get_timeout(devc);
        ^         ~~~~~~~~~~~~~~~~~~~~~~~~~
src/hardware/gmc-mh-1x-2x/protocol.c:941:3: warning: Value stored to 'retc' is never read
                retc = SR_ERR_ARG;
                ^      ~~~~~~~~~~
src/hardware/gmc-mh-1x-2x/api.c:168:2: warning: Value stored to 'model' is never read
        model = METRAHIT_NONE;
        ^       ~~~~~~~~~~~~~
src/hardware/ikalogic-scanalogic2/api.c:325:2: warning: Value stored to 'ret' is never read
        ret = SR_OK;
        ^     ~~~~~
src/hardware/openbench-logic-sniffer/api.c:185:3: warning: Value stored to 'devc' is never read
                devc = sdi->priv;
                ^      ~~~~~~~~~
src/hardware/rigol-ds/api.c:813:3: warning: Value stored to 'devc' is never read
                devc = sdi->priv;
                ^      ~~~~~~~~~
src/hardware/scpi-pps/api.c:405:2: warning: Value stored to 'ret' is never read
        ret = SR_OK;
        ^     ~~~~~
src/hardware/yokogawa-dlm/api.c:239:2: warning: Value stored to 'ret' is never read
        ret = SR_ERR_NA;
        ^     ~~~~~~~~~
12 files changed:
src/dmm/vc870.c
src/hardware/conrad-digi-35-cpu/api.c
src/hardware/fx2lafw/api.c
src/hardware/gmc-mh-1x-2x/api.c
src/hardware/gmc-mh-1x-2x/protocol.c
src/hardware/ikalogic-scanalogic2/api.c
src/hardware/openbench-logic-sniffer/api.c
src/hardware/rigol-ds/api.c
src/hardware/scpi-pps/api.c
src/hardware/yokogawa-dlm/api.c
src/output/srzip.c
src/scpi/scpi.c