Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: Doug Evans <dje@google.com>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>,
	gdb-patches	<gdb-patches@sourceware.org>
Subject: Re: [patch+7.8?] Fix --with-babeltrace with gcc-4.9.1
Date: Wed, 13 Aug 2014 09:52:00 -0000	[thread overview]
Message-ID: <53EB348B.7010408@codesourcery.com> (raw)
In-Reply-To: <CADPb22R-dBvEo2jRvky+HLUAM_WUY6sQ9rNx5TRinnXAXP-rcQ@mail.gmail.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


      reply	other threads:[~2014-08-13  9:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-04 20:38 [patch] " Jan Kratochvil
2014-08-04 23:37 ` Doug Evans
2014-08-06  1:04 ` Yao Qi
2014-08-12 19:22   ` [patch+7.8?] " Jan Kratochvil
2014-08-12 20:33     ` Doug Evans
2014-08-12 20:38       ` Jan Kratochvil
2014-08-12 21:28         ` Doug Evans
2014-08-13  1:54       ` Yao Qi
2014-08-13  3:05         ` Doug Evans
2014-08-13  9:52           ` Yao Qi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53EB348B.7010408@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox