From: Uwe Hermann Date: Mon, 29 Aug 2016 19:10:13 +0000 (+0200) Subject: es51919: Fix a compiler warning. X-Git-Tag: libsigrok-0.5.0~225 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=693c52482a55f7eee9da11b084971560058aebef;p=libsigrok.git es51919: Fix a compiler warning. src/lcr/es51919.c:538:73: warning: comparison of unsigned enum expression \ < 0 is always false [-Wtautological-compare] if ((analog->meaning->mq = parse_mq(pkt, is_secondary, pkt[2] & 0x80)) < 0) --- diff --git a/src/lcr/es51919.c b/src/lcr/es51919.c index 9412ff46..af0dced9 100644 --- a/src/lcr/es51919.c +++ b/src/lcr/es51919.c @@ -535,7 +535,7 @@ static void parse_measurement(const uint8_t *pkt, float *floatval, analog->meaning->mqflags |= SR_MQFLAG_RELATIVE; } - if ((analog->meaning->mq = parse_mq(pkt, is_secondary, pkt[2] & 0x80)) < 0) + if ((analog->meaning->mq = parse_mq(pkt, is_secondary, pkt[2] & 0x80)) == 0) return; if ((buf[3] >> 3) >= ARRAY_SIZE(units)) {