This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit a2964c744d887df12e2d9593001812f78d51fcd2 Author: wangmingrong1 <[email protected]> AuthorDate: Tue Jul 16 14:59:34 2024 +0800 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 <[email protected]> --- 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)
