From 423d20da774c02d4bb3afb903d95c72310b471a4 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Tue, 14 Jan 2020 08:42:05 -0500 Subject: [PATCH] Fix #325, remove dead code/compiler warning With the right compiler flags we get: ./tests/iio_attr.c:529:11: warning: logical 'and' of mutually exclusive tests is always false [-Wlogical-op] since the code looks like: "if (wbuf && !wbuf)" This patch removed the offending/dead lines. Signed-off-by: Robin Getz --- tests/iio_attr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/iio_attr.c b/tests/iio_attr.c index 03dfcfd38..345b75db7 100644 --- a/tests/iio_attr.c +++ b/tests/iio_attr.c @@ -526,8 +526,6 @@ int main(int argc, char **argv) return EXIT_FAILURE; if (attr_index && !argv[attr_index]) return EXIT_FAILURE; - if (wbuf && !wbuf) - return EXIT_FAILURE; if (wbuf && ((device_index && (!strcmp(".", argv[device_index]) || strchr(argv[device_index], '*'))) || (channel_index && (!strcmp(".", argv[channel_index]) ||