From: Gerhard Sittig Date: Sun, 16 Jun 2019 08:42:36 +0000 (+0200) Subject: dmm/eev121gw: silence compiler warning (unused value) X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=d66940a1fa4f735786bea40763193df4a903841f;p=libsigrok.git dmm/eev121gw: silence compiler warning (unused value) Silence a compiler warning about not using an assigned value in later instructions. This is about the EEVBlog 121GW meter's date and device number in received serial packets, which are worth keeping around for future versions of the driver. ../src/dmm/eev121gw.c:728:2: warning: Value stored to 'raw_serial' is never read raw_serial = RB32(&buf[OFF_SERIAL_3]); --- diff --git a/src/dmm/eev121gw.c b/src/dmm/eev121gw.c index 7dfba8d0..ac762207 100644 --- a/src/dmm/eev121gw.c +++ b/src/dmm/eev121gw.c @@ -762,6 +762,8 @@ static int sr_eev121gw_parse(const uint8_t *buf, float *floatval, ser_mon = FIELD_NL(raw_serial, SERIAL_MONTH); ser_nr = FIELD_NL(raw_serial, SERIAL_NUMBER); sr_spew("Packet: Y-M %x-%x, nr %x.", ser_year, ser_mon, ser_nr); + } else { + (void)raw_serial; /* Silence compiler warning. */ } switch (display) {