summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/systemtap/systemtap/fix_for_compilation_with_gcc-4.6.0.patch
blob: a32217586fc5a5963b4cc37195387a3f216a27bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
Upstream-Status: Pending

Fix following compiler errors with gcc 4.6.0:
Nitin A Kamble <nitin.a.kamble@intel.com> 2011/05/09

| tapsets.cxx: In member function 'void sdt_query::handle_probe_entry()':
| tapsets.cxx:5295:8: error: variable 'kprobe_found' set but not used [-Werror=unused-but-set-variable]
| tapsets.cxx: In member function 'virtual void hwbkpt_builder::build(systemtap_session&, probe*, probe_point*, const literal_map_t&, std::vector<derived_probe*>&)':
| tapsets.cxx:7655:18: error: variable 'has_symbol_str' set but not used [-Werror=unused-but-set-variable]
| cc1plus: all warnings being treated as errors
| 
| make[2]: *** [stap-tapsets.o] Error 1
| translate.cxx: In member function 'virtual void c_unparser::visit_print_format(print_format*)':
| translate.cxx:4431:6: error: variable 'width_ix' set but not used [-Werror=unused-but-set-variable]
| cc1plus: all warnings being treated as errors
| 
| make[2]: *** [stap-translate.o] Error 1
| common.c: In function 'fatal_handler':
| common.c:397:13: error: variable 'rc' set but not used [-Werror=unused-but-set-variable]
| cc1: all warnings being treated as errors
| 
| make[3]: *** [common.o] Error 1
| make[3]: *** Waiting for unfinished jobs....
| common.c: In function 'fatal_handler':
| common.c:397:13: error: variable 'rc' set but not used [-Werror=unused-but-set-variable]
| cc1: all warnings being treated as errors
| 
| mainloop.c: In function 'chld_proc':
| mainloop.c:56:11: error: variable 'rc' set but not used [-Werror=unused-but-set-variable]
| mainloop.c: In function 'stp_main_loop':
| mainloop.c:623:17: error: variable 'rc' set but not used [-Werror=unused-but-set-variable]
| cc1: all warnings being treated as errors
| 

Index: git/tapsets.cxx
===================================================================
--- git.orig/tapsets.cxx
+++ git/tapsets.cxx
@@ -5292,7 +5292,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;
@@ -5302,7 +5301,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,
@@ -7652,7 +7650,7 @@ hwbkpt_builder::build(systemtap_session 
 {
   string symbol_str_val;
   int64_t hwbkpt_address, len;
-  bool has_addr, has_symbol_str, has_write, has_rw, has_len;
+  bool has_addr, has_write, has_rw, has_len;
 
   if (! (sess.kernel_config["CONFIG_PERF_EVENTS"] == string("y")))
       throw semantic_error ("CONFIG_PERF_EVENTS not available on this kernel",
@@ -7662,7 +7660,6 @@ hwbkpt_builder::build(systemtap_session 
                             location->components[0]->tok);
 
   has_addr = get_param (parameters, TOK_HWBKPT, hwbkpt_address);
-  has_symbol_str = get_param (parameters, TOK_HWBKPT, symbol_str_val);
   has_len = get_param (parameters, TOK_LENGTH, len);
   has_write = (parameters.find(TOK_HWBKPT_WRITE) != parameters.end());
   has_rw = (parameters.find(TOK_HWBKPT_RW) != parameters.end());
Index: git/translate.cxx
===================================================================
--- git.orig/translate.cxx
+++ git/translate.cxx
@@ -4428,7 +4428,7 @@ c_unparser::visit_print_format (print_fo
 	  continue;
 
 	/* Take note of the width and precision arguments, if any.  */
-	int width_ix = -1, prec_ix= -1;
+	int __attribute((__unused__)) width_ix = -1, prec_ix= -1;
 	if (components[i].widthtype == print_format::width_dynamic)
 	  width_ix = arg_ix++;
 	if (components[i].prectype == print_format::prec_dynamic)
Index: git/runtime/staprun/common.c
===================================================================
--- git.orig/runtime/staprun/common.c
+++ git/runtime/staprun/common.c
@@ -394,7 +394,7 @@ void parse_modpath(const char *inpath)
 #define ERR_MSG "\nUNEXPECTED FATAL ERROR in staprun. Please file a bug report.\n"
 static void fatal_handler (int signum)
 {
-        int rc;
+        int __attribute__((__unused__)) rc;
         char *str = strsignal(signum);
         rc = write (STDERR_FILENO, ERR_MSG, sizeof(ERR_MSG));
         rc = write (STDERR_FILENO, str, strlen(str));
Index: git/runtime/staprun/mainloop.c
===================================================================
--- git.orig/runtime/staprun/mainloop.c
+++ git/runtime/staprun/mainloop.c
@@ -53,7 +53,7 @@ static void *signal_thread(void *arg)
 
 static void chld_proc(int signum)
 {
-  int32_t rc, btype = STP_EXIT;
+  int32_t __attribute__((__unused__)) rc, btype = STP_EXIT;
   dbug(2, "chld_proc %d (%s)\n", signum, strsignal(signum));
   pid_t pid = waitpid(-1, NULL, WNOHANG);
   if (pid != target_pid)
@@ -620,7 +620,7 @@ int stp_main_loop(void)
       {
         /* module asks us to start exiting, so send STP_EXIT */
         dbug(2, "got STP_REQUEST_EXIT\n");
-        int32_t rc, btype = STP_EXIT;
+        int32_t __attribute__((__unused__))rc, btype = STP_EXIT;
         rc = write(control_channel, &btype, sizeof(btype));
         break;
       }
OpenPOWER on IntegriCloud