]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix uninitialized variable in frontend [PR121806]
authorAndre Vehreschild <vehre@gcc.gnu.org>
Thu, 4 Sep 2025 06:20:04 +0000 (08:20 +0200)
committerSam James <sam@gentoo.org>
Fri, 5 Sep 2025 22:01:48 +0000 (23:01 +0100)
gcc/ChangeLog:
PR middle-end/121806
* gcc.cc (for_each_path): Initialize return value.

gcc/gcc.cc

index 722d42c69683117511c9e18374fb3ec84f17c8e5..8da821e92ac4efc715be369ab97c4f84397e19f4 100644 (file)
@@ -2788,7 +2788,7 @@ for_each_path (const struct path_prefix *paths,
   const char *multi_suffix;
   const char *just_multi_suffix;
   char *path = NULL;
-  decltype (callback (nullptr)) ret;
+  decltype (callback (nullptr)) ret = nullptr;
   bool skip_multi_dir = false;
   bool skip_multi_os_dir = false;