]> sigrok.org Git - libsigrok.git/commitdiff
uni-t-dmm: Fix compiler warning.
authorUwe Hermann <redacted>
Mon, 31 Dec 2012 20:01:53 +0000 (21:01 +0100)
committerUwe Hermann <redacted>
Mon, 31 Dec 2012 20:01:53 +0000 (21:01 +0100)
protocol.c:84:5: warning: 'ret' may be used uninitialized in this
function [-Wmaybe-uninitialized]

hardware/uni-t-dmm/protocol.c

index 55f573afdcb0e18e1216cf0c391016396f77bc21..929ba9ecf6a42a382a2c8bc33d96f81d11a7893a 100644 (file)
@@ -77,6 +77,7 @@ static void decode_packet(struct dev_context *devc, int dmm, const uint8_t *buf)
        memset(&analog, 0, sizeof(struct sr_datafeed_analog));
 
        /* Parse the protocol packet. */
+       ret = SR_ERR;
        if (dmm == UNI_T_UT61D)
                ret = sr_dmm_parse_fs9922(buf, &floatval, &analog);
        else if (dmm == VOLTCRAFT_VC820)