This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch+7.8?] Fix --with-babeltrace with gcc-4.9.1
- From: Yao Qi <yao at codesourcery dot com>
- To: Doug Evans <dje at google dot com>
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Wed, 13 Aug 2014 17:48:59 +0800
- Subject: Re: [patch+7.8?] Fix --with-babeltrace with gcc-4.9.1
- Authentication-results: sourceware.org; auth=none
- References: <20140804202907 dot GA2608 at host2 dot jankratochvil dot net> <53E17E14 dot 8070104 at codesourcery dot com> <20140812192204 dot GA13299 at host2 dot jankratochvil dot net> <CADPb22S-e=fR9DCHQwMPaoKoTMfjjLk2C5_h3m5VJMBAXEE8Pg at mail dot gmail dot com> <53EAC446 dot 5060409 at codesourcery dot com> <CADPb22R-dBvEo2jRvky+HLUAM_WUY6sQ9rNx5TRinnXAXP-rcQ at mail dot gmail dot com>
On 08/13/2014 11:05 AM, Doug Evans wrote:
> I suspect it'll be useful to be able to refer to this reasoning at
> some point in the future.
> [ref: the "incompatible pointer type" warning is related to the
> assignment to scope, not pos].
> Maybe this thread is sufficient, or maybe you could add something to
> the commit message.
I add something into the commit message as below. Patch is committed
to mainline and 7.8 branch.
--
Yao (éå)
Subject: [PATCH] Fix build/17104
This patch is to fix the build error when GDB is configured as:
CFLAGS=-Wall ./configure --with-babeltrace; make
This patch adds one line of code in configure test to use local
variable 'pos'.
Note that we append -Werror to CFLAGS to catch the warning related to
assignment to scope. See more in this thread
https://sourceware.org/ml/gdb-patches/2014-08/msg00045.html
2014-08-13 Yao Qi <yao@codesourcery.com>
PR build/17104
* configure.ac: Use local variable 'pos'.
* configure: Regenerated.
---
gdb/configure | 1 +
gdb/configure.ac | 1 +
2 files changed, 2 insertions(+)
diff --git a/gdb/configure b/gdb/configure
index 809326a..874922d 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -15344,6 +15344,7 @@ struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
struct bt_ctf_event *event = NULL;
const struct bt_definition *scope;
+ bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
scope = bt_ctf_get_top_level_scope (event,
BT_STREAM_EVENT_HEADER);
bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 70d0964..61919b4 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -2437,6 +2437,7 @@ else
struct bt_ctf_event *event = NULL;
const struct bt_definition *scope;
+ bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
scope = bt_ctf_get_top_level_scope (event,
BT_STREAM_EVENT_HEADER);
bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
--
1.9.0