]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
asan: coff-alpha use of uninitialised value
authorAlan Modra <amodra@gmail.com>
Mon, 19 Jan 2026 04:15:26 +0000 (14:45 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 19 Jan 2026 04:30:10 +0000 (15:00 +1030)
I think this is a false positive as the "use" is reported at a
_bfd_link_reloc_status_error call, and the value passed is not used
except when bfd_reloc_dangerous.  Avoid the warning anyway.

* coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
Avoid false positive warning.

bfd/coff-alpha.c

index b57ca2b32f625f39f0643f4433d97912e4e86f6a..9e6325636ce8b5808afb7e5bb2e7597867045845 100644 (file)
@@ -861,7 +861,7 @@ alpha_ecoff_get_relocated_section_contents (bfd *abfd,
     {
       arelent *rel;
       bfd_reloc_status_type r;
-      char *err;
+      char *err = NULL;
       unsigned int r_type;
 
       rel = *relp;