Skip to content

Commit

Permalink
gcov.c: deal compile warming
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
W-M-R authored and xiaoxiang781216 committed Oct 9, 2024
1 parent aa9d69e commit a2964c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/gcov/gcov.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a2964c7

Please sign in to comment.