Initialize gdb::optional empty payload to quiet false -Wmaybe-uninitialized warnings
[deliverable/binutils-gdb.git] / gdb / auto-load.c
index 56914c8f3a88d4eaa789cf9b15b9e2dc47373343..edaf264548e35761fdfc4fa73f0003166437e879 100644 (file)
@@ -1174,7 +1174,8 @@ auto_load_section_scripts (struct objfile *objfile, const char *section_name)
   bfd_byte *data = NULL;
 
   scripts_sect = bfd_get_section_by_name (abfd, section_name);
-  if (scripts_sect == NULL)
+  if (scripts_sect == NULL
+      || (bfd_get_section_flags (abfd, scripts_sect) & SEC_HAS_CONTENTS) == 0)
     return;
 
   if (!bfd_get_full_section_contents (abfd, scripts_sect, &data))
This page took 0.023573 seconds and 4 git commands to generate.