Skip to content

Commit

Permalink
Fix #325, remove dead code/compiler warning
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rgetz committed Jan 14, 2020
1 parent 48ffd18 commit 423d20d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions tests/iio_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]) ||
Expand Down

0 comments on commit 423d20d

Please sign in to comment.