Building GDB 15.0.91 on MinGW: gcore.c

Eli Zaretskii eliz@gnu.org
Sat Jun 8 07:25:41 GMT 2024


> From: Tom Tromey <tom@tromey.com>
> Cc: Joel Brobecker <brobecker@adacore.com>,  gdb-patches@sourceware.org
> Date: Fri, 07 Jun 2024 13:39:57 -0600
> 
> >>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
> 
> Eli> --- gdb/gcore.c~0	2024-05-26 18:55:53.000000000 +0300
> Eli> +++ gdb/gcore.c	2024-06-06 22:43:14.518884300 +0300
> Eli> @@ -528,7 +528,7 @@ objfile_find_memory_regions (struct targ
> Eli>  			     find_memory_region_ftype func, void *obfd)
> Eli>  {
> Eli>    /* Use objfile data to create memory sections.  */
> Eli> -  bfd_vma temp_bottom, temp_top;
> Eli> +  bfd_vma temp_bottom = 0, temp_top = 0;
>  
> Eli>    /* Call callback function for each objfile section.  */
> Eli>    for (objfile *objfile : current_program_space->objfiles ())
> 
> Eli> OK to install?
> 
> Ok.
> Approved-By: Tom Tromey <tom@tromey.com>

Thanks, installed:

commit e222ed2ce5b5359bfc6d8fd125534ccb507d7fb0
Author:     Eli Zaretskii <eliz@gnu.org>
AuthorDate: Sat Jun 8 10:22:03 2024 +0300
Commit:     Eli Zaretskii <eliz@gnu.org>
CommitDate: Sat Jun 8 10:22:03 2024 +0300

    gdb: Avoid compilation warning in gcore.c.
    
    See https://sourceware.org/pipermail/gdb-patches/2024-June/209726.html
    for the details.
    
    Approved-By: Tom Tromey <tom@tromey.com>

diff --git a/gdb/gcore.c b/gdb/gcore.c
index 0079662..2ab00a0 100644
--- a/gdb/gcore.c
+++ b/gdb/gcore.c
@@ -528,7 +528,7 @@ objfile_find_memory_regions (struct target_ops *self,
 			     find_memory_region_ftype func, void *obfd)
 {
   /* Use objfile data to create memory sections.  */
-  bfd_vma temp_bottom, temp_top;
+  bfd_vma temp_bottom = 0, temp_top = 0;
 
   /* Call callback function for each objfile section.  */
   for (objfile *objfile : current_program_space->objfiles ())


More information about the Gdb-patches mailing list