From: Uwe Hermann Date: Mon, 31 Dec 2012 20:01:53 +0000 (+0100) Subject: uni-t-dmm: Fix compiler warning. X-Git-Tag: dsupstream~397 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=811155da461851e8a7f75df898a301a7db48c667;p=libsigrok.git uni-t-dmm: Fix compiler warning. protocol.c:84:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] --- diff --git a/hardware/uni-t-dmm/protocol.c b/hardware/uni-t-dmm/protocol.c index 55f573af..929ba9ec 100644 --- a/hardware/uni-t-dmm/protocol.c +++ b/hardware/uni-t-dmm/protocol.c @@ -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)