summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKent Gibson <warthog618@gmail.com>2021-11-08 09:28:50 +0800
committerBartosz Golaszewski <brgl@bgdev.pl>2021-11-15 14:27:50 +0100
commitc472d71be0be0f0ca0fbb794dce83bd76623ee2f (patch)
treea55835926f52f6871ea3a334edc6389333e72db3 /tools
parent92a59d7f381d2caf69385bfa00590028e32eea26 (diff)
downloadlinux-c472d71be0be0f0ca0fbb794dce83bd76623ee2f.tar.bz2
selftests: gpio: fix uninitialised variable warning
When compiled with -Wall gpio-mockup-cdev.c reports an uninitialised variable warning. This is a false positive, as the variable is ignored in the case it is uninitialised, but initialise the variable anyway to remove the warning. Signed-off-by: Kent Gibson <warthog618@gmail.com> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/gpio/gpio-mockup-cdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/gpio/gpio-mockup-cdev.c b/tools/testing/selftests/gpio/gpio-mockup-cdev.c
index e83eac71621a..d1640f44f8ac 100644
--- a/tools/testing/selftests/gpio/gpio-mockup-cdev.c
+++ b/tools/testing/selftests/gpio/gpio-mockup-cdev.c
@@ -117,7 +117,7 @@ int main(int argc, char *argv[])
{
char *chip;
int opt, ret, cfd, lfd;
- unsigned int offset, val, abiv;
+ unsigned int offset, val = 0, abiv;
uint32_t flags_v1;
uint64_t flags_v2;