From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12848 invoked by alias); 1 Jul 2014 03:46:03 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 12806 invoked by uid 48); 1 Jul 2014 03:46:02 -0000 From: "qiyao at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug build/17104] CFLAGS="-Wall -Wextra" gdb/confgure --with-babeltrace fails Date: Tue, 01 Jul 2014 03:46:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: build X-Bugzilla-Version: 7.7 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: qiyao at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q3/txt/msg00000.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17104 Yao Qi changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |qiyao at gcc dot gnu.org --- Comment #1 from Yao Qi --- I can reproduce it with gcc 4.8.2 (shipped on Fedora 20). configure:15245: gcc -o conftest -Wall -Wextra -Werror -I/home/yao/Source/lttng/babeltrace/1.1.0/install/include conftest.c -ldl -lncurses -lz -lm /home/yao/Source/lttng/babeltrace/1.1.0/install/lib/libbabeltrace.so /home/yao/Source/lttng/babeltrace/1.1.0/install/lib/libbabeltrace-ctf.so -lpopt -lgmodule-2.0 -lrt -lglib-2.0 -luuid -Wl,-rpath -Wl,/home/yao/Source/lttng/babeltrace/1.1.0/install/lib >&5 conftest.c: In function 'main': conftest.c:192:21: error: unused variable 'pos' [-Werror=unused-variable] struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL)); ^ cc1: all warnings being treated as errors and this can be fixed by the following patch. However, I suspect whether GDB can be built with '-Wall -Wextra -Werror', because even with the patch, I still get build failure in libiberty and gdb later. 2014-07-01 Yao Qi 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 a4c0a8c..7956aa7 100755 --- a/gdb/configure +++ b/gdb/configure @@ -15234,6 +15234,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 a2ac15f..fc1d8bc 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -2417,6 +2417,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 -- You are receiving this mail because: You are on the CC list for the bug.