]> git.eshelyaron.com Git - emacs.git/commitdiff
Pacify GCC 12.1.1 in default developer build
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Jun 2022 20:21:18 +0000 (13:21 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Jun 2022 20:39:48 +0000 (13:39 -0700)
* src/pdumper.c (pdumper_load): Use explicit memset to work around
GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105961>.

src/pdumper.c

index 0efd5cfb0bbc83605dc9d3fd3e829d472ef178e8..50ae4f85e7ed36d40b1f7b2525b9b47da97bdfaf 100644 (file)
@@ -5543,7 +5543,10 @@ pdumper_load (const char *dump_filename, char *argv0)
 
   struct dump_header header_buf = { 0 };
   struct dump_header *header = &header_buf;
-  struct dump_memory_map sections[NUMBER_DUMP_SECTIONS] = { 0 };
+  struct dump_memory_map sections[NUMBER_DUMP_SECTIONS];
+
+  /* Use memset instead of "= { 0 }" to work around GCC bug 105961.  */
+  memset (sections, 0, sizeof sections);
 
   const struct timespec start_time = current_timespec ();
   char *dump_filename_copy;