Accepting request 69301 from devel:tools
Build fixes for gcc 4.6 OBS-URL: https://build.opensuse.org/request/show/69301 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemtap?expand=0&rev=62
This commit is contained in:
commit
3ce5870150
110
systemtap-1.4-gcc46.patch
Normal file
110
systemtap-1.4-gcc46.patch
Normal file
@ -0,0 +1,110 @@
|
||||
From: Ismail Doenmez <idoenmez@suse.de>
|
||||
Subject: Fix compilation with gcc 4.6
|
||||
Date: 02.05.2011
|
||||
References: N/A
|
||||
Upstream: yes
|
||||
Signed-Off-by: Frank Ch. Eigler <fche@redhat.com>
|
||||
|
||||
Fix GCC 4.6 unused-variable warnings
|
||||
Upstream commit id: 5d8a0aeabbbf3d2e4d0a6c51e6ca9b6d9446c8a0
|
||||
|
||||
diff --git a/grapher/grapher.cxx b/grapher/grapher.cxx
|
||||
index 0111184..87489af 100644
|
||||
--- a/grapher/grapher.cxx
|
||||
+++ b/grapher/grapher.cxx
|
||||
@@ -72,11 +72,13 @@ extern "C"
|
||||
strerror_r(errno, errbuf, sizeof(errbuf));
|
||||
err = write(STDERR_FILENO, errbuf, strlen(errbuf));
|
||||
err = write(STDERR_FILENO, "\n", 1);
|
||||
+ (void) err; /* XXX: notused */
|
||||
return;
|
||||
}
|
||||
else if (childInfo.pid > 0)
|
||||
{
|
||||
err = write(signalPipe[1], &childInfo, sizeof(childInfo));
|
||||
+ (void) err; /* XXX: notused */
|
||||
}
|
||||
else
|
||||
return;
|
||||
diff --git a/runtime/staprun/common.c b/runtime/staprun/common.c
|
||||
index 4fbc9e5..99026fb 100644
|
||||
--- a/runtime/staprun/common.c
|
||||
+++ b/runtime/staprun/common.c
|
||||
@@ -399,6 +399,7 @@ static void fatal_handler (int signum)
|
||||
rc = write (STDERR_FILENO, ERR_MSG, sizeof(ERR_MSG));
|
||||
rc = write (STDERR_FILENO, str, strlen(str));
|
||||
rc = write (STDERR_FILENO, "\n", 1);
|
||||
+ (void) rc; /* notused */
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
diff --git a/runtime/staprun/mainloop.c b/runtime/staprun/mainloop.c
|
||||
index 2733c2e..1514969 100644
|
||||
--- a/runtime/staprun/mainloop.c
|
||||
+++ b/runtime/staprun/mainloop.c
|
||||
@@ -60,6 +60,7 @@ static void chld_proc(int signum)
|
||||
return;
|
||||
// send STP_EXIT
|
||||
rc = write(control_channel, &btype, sizeof(btype));
|
||||
+ (void) rc; /* XXX: notused */
|
||||
}
|
||||
|
||||
#if WORKAROUND_BZ467568
|
||||
@@ -622,6 +623,7 @@ int stp_main_loop(void)
|
||||
dbug(2, "got STP_REQUEST_EXIT\n");
|
||||
int32_t rc, btype = STP_EXIT;
|
||||
rc = write(control_channel, &btype, sizeof(btype));
|
||||
+ (void) rc; /* XXX: notused */
|
||||
break;
|
||||
}
|
||||
case STP_START:
|
||||
diff --git a/tapsets.cxx b/tapsets.cxx
|
||||
index b141921..4daae5e 100644
|
||||
--- a/tapsets.cxx
|
||||
+++ b/tapsets.cxx
|
||||
@@ -5341,7 +5341,6 @@ sdt_query::handle_probe_entry()
|
||||
probe *new_base = convert_location();
|
||||
probe_point *new_location = new_base->locations[0];
|
||||
|
||||
- bool kprobe_found = false;
|
||||
bool need_debug_info = false;
|
||||
|
||||
Dwarf_Addr bias;
|
||||
@@ -5351,7 +5350,6 @@ sdt_query::handle_probe_entry()
|
||||
if (have_kprobe())
|
||||
{
|
||||
convert_probe(new_base);
|
||||
- kprobe_found = true;
|
||||
// Expand the local variables in the probe body
|
||||
sdt_kprobe_var_expanding_visitor svv (module_val,
|
||||
provider_name,
|
||||
@@ -7726,13 +7724,15 @@ hwbkpt_builder::build(systemtap_session & sess,
|
||||
"",len,0,
|
||||
has_write,
|
||||
has_rw));
|
||||
- else // has symbol_str
|
||||
+ else if (has_symbol_str)
|
||||
finished_results.push_back (new hwbkpt_derived_probe (base,
|
||||
location,
|
||||
0,
|
||||
symbol_str_val,len,0,
|
||||
has_write,
|
||||
has_rw));
|
||||
+ else
|
||||
+ assert (0);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
diff --git a/translate.cxx b/translate.cxx
|
||||
index e5038f9..82f3ee4 100644
|
||||
--- a/translate.cxx
|
||||
+++ b/translate.cxx
|
||||
@@ -4447,6 +4447,8 @@ c_unparser::visit_print_format (print_format* e)
|
||||
if (components[i].prectype == print_format::prec_dynamic)
|
||||
prec_ix = arg_ix++;
|
||||
|
||||
+ (void) width_ix; /* XXX: notused */
|
||||
+
|
||||
/* %m and %M need special care for digging into memory. */
|
||||
if (components[i].type == print_format::conv_memory
|
||||
|| components[i].type == print_format::conv_memory_hex)
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon May 2 15:11:31 UTC 2011 - idoenmez@novell.com
|
||||
|
||||
- Add systemtap-1.4-gcc46.patch to fix compilation with gcc 4.6
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 15 17:50:11 CET 2011 - jslaby@suse.de
|
||||
|
||||
|
@ -40,6 +40,8 @@ Source: ftp://sources.redhat.com/pub/systemtap/snapshots/systemtap-%{pac
|
||||
# so that they are installed into directories matching below rm -rf's
|
||||
Patch1: systemtap-docdir-fix.diff
|
||||
Patch2: 0001-adding-ifdef-CLONE_STOPPED-to-stop-module-compilati.patch
|
||||
# PATCH-FIX-UPSTREAM systemtap-1.4-gcc46.patch idoenmez@suse.de -- Fix compilation with gcc 4.6
|
||||
Patch3: systemtap-1.4-gcc46.patch
|
||||
|
||||
Requires: libebl1
|
||||
Requires: %{name}-runtime = %{version}-%{release}
|
||||
@ -102,6 +104,7 @@ This package contains the support tools for static probes.
|
||||
%endif
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%build
|
||||
autoreconf -fi
|
||||
|
Loading…
Reference in New Issue
Block a user