From 9aedfdd4f7fdd5bd1aadeee9ec4e473ab023c7f5 Mon Sep 17 00:00:00 2001 From: wangmingrong1 Date: Tue, 16 Jul 2024 14:59:34 +0800 Subject: [PATCH] gcov.c: deal compile warming gcov.c:61:6: warning: 'path' may be used uninitialized [-Wmaybe-uninitialized] 61 | if (path == NULL || access(path, F_OK) != 0 || atoi(strip) <= 0) | ^ gcov.c: In function 'gcov_main': gcov.c:79:19: note: 'path' was declared here 79 | FAR const char *path; Signed-off-by: wangmingrong1 --- system/gcov/gcov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/gcov/gcov.c b/system/gcov/gcov.c index 9506cadb1..53b88a121 100644 --- a/system/gcov/gcov.c +++ b/system/gcov/gcov.c @@ -76,7 +76,7 @@ static void gcov_dump(FAR const char * path, FAR const char *strip) int main(int argc, FAR char *argv[]) { FAR const char *strip = "99"; - FAR const char *path; + FAR const char *path = NULL; int option; if (argc < 2)