The warning looks like: utest/tracefs-utest.c:706:7: error: variable 'fd' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (rstat != -1) ^~~~~~~~~~~ Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx> --- utest/tracefs-utest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utest/tracefs-utest.c b/utest/tracefs-utest.c index c5efd5f..a0d911b 100644 --- a/utest/tracefs-utest.c +++ b/utest/tracefs-utest.c @@ -659,7 +659,7 @@ static bool check_option(struct tracefs_instance *instance, bool supported; struct stat st; char buf[10]; - int fd; + int fd = 0; int r; int rstat; -- 2.31.1.498.g6c1eba8ee3d-goog