From: Gerhard Sittig Date: Sun, 16 Jun 2019 08:30:50 +0000 (+0200) Subject: serial_hid: silence compiler warning (unused value) X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=487d4528be9fce621d2a7111fcb16056a0048ad8;p=libsigrok.git serial_hid: silence compiler warning (unused value) Silence a compiler warning about assigning a value to a variable that's not used in subsequent instructions. This 'have_chip' condition is worth keeping around, in case the HID chip search code receives updates later. Removing the assignment may complicate maintenance, or result in incomplete diagnostics during research. ../src/serial_hid.c:1066:3: warning: Value stored to 'have_chip' is never read have_chip = 1; --- diff --git a/src/serial_hid.c b/src/serial_hid.c index eccdf0f2..ac9afaca 100644 --- a/src/serial_hid.c +++ b/src/serial_hid.c @@ -1025,6 +1025,7 @@ static int ser_hid_chip_search(enum ser_hid_chip_t *chip_ref, return SR_ERR_NA; have_chip = 1; } + (void)have_chip; if (chip_ref) *chip_ref = chip;