Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Kent Gibson and committed by
Bartosz Golaszewski
c472d71b 92a59d7f

+1 -1
+1 -1
tools/testing/selftests/gpio/gpio-mockup-cdev.c
··· 117 117 { 118 118 char *chip; 119 119 int opt, ret, cfd, lfd; 120 - unsigned int offset, val, abiv; 120 + unsigned int offset, val = 0, abiv; 121 121 uint32_t flags_v1; 122 122 uint64_t flags_v2; 123 123