This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Initialize variable on gdb/linux-tdep.c:decode_vmflags
- From: Sergio Durigan Junior <sergiodj at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 7 Apr 2015 19:20:45 -0000
- Subject: [binutils-gdb] Initialize variable on gdb/linux-tdep.c:decode_vmflags
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d249a14abe5c2ee3ba4dc6c47e68e41ddc2025a4
commit d249a14abe5c2ee3ba4dc6c47e68e41ddc2025a4
Author: Sergio Durigan Junior <sergiodj@redhat.com>
Date: Tue Apr 7 15:19:07 2015 -0400
Initialize variable on gdb/linux-tdep.c:decode_vmflags
This obvious commit initializes the 'saveptr' variable on
gdb/linux-tdep.c:decode_vmflags. This was causing a build failure on
Fedora 21 x86_64, caught by the BuildBot here:
<https://sourceware.org/ml/gdb-testers/2015-q2/msg00450.html>
Diff:
---
gdb/ChangeLog | 4 ++++
gdb/linux-tdep.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b0c65a2..432cc3e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-07 Sergio Durigan Junior <sergiodj@redhat.com>
+
+ * linux-tdep.c (decode_vmflags): Initialize 'saveptr'.
+
2015-04-07 Pedro Alves <palves@redhat.com>
* gdbthread.h (ALL_NON_EXITED_THREADS_SAFE): Rename to ...
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
index 4af1d01..0b11e58 100644
--- a/gdb/linux-tdep.c
+++ b/gdb/linux-tdep.c
@@ -445,7 +445,7 @@ read_mapping (const char *line,
static void
decode_vmflags (char *p, struct smaps_vmflags *v)
{
- char *saveptr;
+ char *saveptr = NULL;
const char *s;
v->initialized_p = 1;