aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2015-12-01 17:49:27 +0100
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2015-12-01 17:49:27 +0100
commit2e3b657e3a811087533cec33307eb8bbf454cd1c (patch)
tree8196a12bb5f0352106cfc806495b35b07c12638e /gdb/remote.c
parent99fd02d9fc9d6cc470d3b81c4cc3439b47bb9419 (diff)
downloadgdb-2e3b657e3a811087533cec33307eb8bbf454cd1c.zip
gdb-2e3b657e3a811087533cec33307eb8bbf454cd1c.tar.gz
gdb-2e3b657e3a811087533cec33307eb8bbf454cd1c.tar.bz2
Fix uninitialized variable warnings in remote.c
Fix a couple of places where a struct thread_item was added to a vector while the item.name field was uninitialized. gdb/ * remote.c (remote_newthread_step): Initialize item.name. (remote_get_threads_with_qthreadinfo): Likewise.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 9d44ce1..c60f173 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -2914,6 +2914,7 @@ remote_newthread_step (threadref *ref, void *data)
item.ptid = ptid_build (pid, threadref_to_int (ref), 0);
item.core = -1;
+ item.name = NULL;
item.extra = NULL;
VEC_safe_push (thread_item_t, context->items, &item);
@@ -3079,6 +3080,7 @@ remote_get_threads_with_qthreadinfo (struct target_ops *ops,
item.ptid = read_ptid (bufp, &bufp);
item.core = -1;
+ item.name = NULL;
item.extra = NULL;
VEC_safe_push (thread_item_t, context->items, &item);