mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 18:14:13 +08:00
C++: Initialize a couple const globals
In C++ mode, we get: src/gdb/gdbserver/tdesc.c:43:33: error: uninitialized const ‘default_description’ [-fpermissive] static const struct target_desc default_description; ^ In file included from src/gdb/gdbserver/tdesc.c:19:0: src/gdb/gdbserver/tdesc.h:26:8: note: ‘const struct target_desc’ has no user-provided default constructor struct target_desc ^ gdb/ChangeLog: 2015-08-21 Pedro Alves <palves@redhat.com> * frame.c (null_frame_id): Explicitly zero-initialize. gdb/gdbserver/ChangeLog: 2015-08-21 Pedro Alves <palves@redhat.com> * tdesc.c (default_description): Explicitly zero-initialize.
This commit is contained in:
parent
049412e38f
commit
f890475111
@ -1,3 +1,7 @@
|
|||||||
|
2015-08-21 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
|
* frame.c (null_frame_id): Explicitly zero-initialize.
|
||||||
|
|
||||||
2015-08-21 Tom Tromey <tromey@redhat.com>
|
2015-08-21 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* dwarf2read.c (struct dwarf2_section_info): Rename field
|
* dwarf2read.c (struct dwarf2_section_info): Rename field
|
||||||
|
@ -503,7 +503,7 @@ frame_unwind_caller_id (struct frame_info *next_frame)
|
|||||||
return null_frame_id;
|
return null_frame_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct frame_id null_frame_id; /* All zeros. */
|
const struct frame_id null_frame_id = { 0 }; /* All zeros. */
|
||||||
const struct frame_id outer_frame_id = { 0, 0, 0, FID_STACK_INVALID, 0, 1, 0 };
|
const struct frame_id outer_frame_id = { 0, 0, 0, FID_STACK_INVALID, 0, 1, 0 };
|
||||||
|
|
||||||
struct frame_id
|
struct frame_id
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2015-08-21 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
|
* tdesc.c (default_description): Explicitly zero-initialize.
|
||||||
|
|
||||||
2015-08-21 Pedro Alves <palves@redhat.com>
|
2015-08-21 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
PR gdb/18749
|
PR gdb/18749
|
||||||
|
@ -40,7 +40,7 @@ init_target_desc (struct target_desc *tdesc)
|
|||||||
|
|
||||||
#ifndef IN_PROCESS_AGENT
|
#ifndef IN_PROCESS_AGENT
|
||||||
|
|
||||||
static const struct target_desc default_description;
|
static const struct target_desc default_description = { 0 };
|
||||||
|
|
||||||
void
|
void
|
||||||
copy_target_description (struct target_desc *dest,
|
copy_target_description (struct target_desc *dest,
|
||||||
|
Loading…
Reference in New Issue
Block a user