From: Martin Jambor Date: Thu, 26 Jun 2025 09:25:20 +0000 (+0200) Subject: fortran: Avoid freeing uninitialized value X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bf6078d2aaee8b240b7425b9788d8038cd45c8f3;p=thirdparty%2Fgcc.git fortran: Avoid freeing uninitialized value When compiling fortran/match.cc, clang emits a warning fortran/match.cc:5301:7: warning: variable 'p' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] which looks accurate, so this patch adds an initialization of p to avoid the use. gcc/fortran/ChangeLog: 2025-06-23 Martin Jambor * match.cc (gfc_match_nullify): Initialize p to NULL; --- diff --git a/gcc/fortran/match.cc b/gcc/fortran/match.cc index aa0b04afd56..8355a390ee0 100644 --- a/gcc/fortran/match.cc +++ b/gcc/fortran/match.cc @@ -5293,7 +5293,7 @@ match gfc_match_nullify (void) { gfc_code *tail; - gfc_expr *e, *p; + gfc_expr *e, *p = NULL; match m; tail = NULL;