From: Uwe Hermann Date: Mon, 29 Aug 2016 19:29:40 +0000 (+0200) Subject: fluke-dmm: Fix two compiler warnings. X-Git-Tag: libsigrok-0.5.0~224 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=55ec0b673af83b70615482c0c5ce33b18ef02fa8;p=libsigrok.git fluke-dmm: Fix two compiler warnings. src/hardware/fluke-dmm/fluke.c:312:24: warning: implicit conversion from \ enumeration type 'enum sr_unit' to different enumeration type 'enum sr_mq' \ [-Wenum-conversion] devc->mq = devc->unit = devc->mqflags = 0; ~ ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/hardware/fluke-dmm/fluke.c:312:40: warning: implicit conversion from \ enumeration type 'enum sr_mqflag' to different enumeration type 'enum \ sr_unit' [-Wenum-conversion] devc->mq = devc->unit = devc->mqflags = 0; ~ ~~~~~~~~~~~~~~^~~ --- diff --git a/src/hardware/fluke-dmm/fluke.c b/src/hardware/fluke-dmm/fluke.c index 094832dd..89849f42 100644 --- a/src/hardware/fluke-dmm/fluke.c +++ b/src/hardware/fluke-dmm/fluke.c @@ -309,7 +309,10 @@ static void handle_qm_19x_meta(const struct sr_dev_inst *sdi, char **tokens) return; meas_char = strtol(tokens[4], NULL, 10); - devc->mq = devc->unit = devc->mqflags = 0; + devc->mq = 0; + devc->unit = 0; + devc->mqflags = 0; + switch (meas_unit) { case 1: devc->mq = SR_MQ_VOLTAGE;