Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

GCC: Attempt to fix GCC 4.62 Compile Error

  • Loading branch information...
commit 367cd5e2e82c8951f2146c30b0f835e8a5598094 1 parent 48b2d2d
Burst Lam burstlam authored committed
2  tools/perf/bench/sched-pipe.c
@@ -55,7 +55,7 @@ int bench_sched_pipe(int argc, const char **argv,
55 55 * discarding returned value of read(), write()
56 56 * causes error in building environment for perf
57 57 */
58   - int ret, wait_stat;
  58 + int __used ret, wait_stat;
59 59 pid_t pid, retpid;
60 60
61 61 argc = parse_options(argc, argv, options,
12 tools/perf/builtin-sched.c
@@ -369,11 +369,6 @@ static void
369 369 process_sched_event(struct task_desc *this_task __used, struct sched_atom *atom)
370 370 {
371 371 int ret = 0;
372   - u64 now;
373   - long long delta;
374   -
375   - now = get_nsecs();
376   - delta = start_time + atom->timestamp - now;
377 372
378 373 switch (atom->type) {
379 374 case SCHED_EVENT_RUN:
@@ -561,7 +556,7 @@ static void wait_for_tasks(void)
561 556
562 557 static void run_one_test(void)
563 558 {
564   - u64 T0, T1, delta, avg_delta, fluct, std_dev;
  559 + u64 T0, T1, delta, avg_delta, fluct;
565 560
566 561 T0 = get_nsecs();
567 562 wait_for_tasks();
@@ -577,7 +572,6 @@ static void run_one_test(void)
577 572 else
578 573 fluct = delta - avg_delta;
579 574 sum_fluct += fluct;
580   - std_dev = sum_fluct / nr_runs / sqrt(nr_runs);
581 575 if (!run_avg)
582 576 run_avg = delta;
583 577 run_avg = (run_avg*9 + delta)/10;
@@ -798,7 +792,7 @@ replay_switch_event(struct trace_switch_event *switch_event,
798 792 u64 timestamp,
799 793 struct thread *thread __used)
800 794 {
801   - struct task_desc *prev, *next;
  795 + struct task_desc *prev, __used *next;
802 796 u64 timestamp0;
803 797 s64 delta;
804 798
@@ -1403,7 +1397,7 @@ map_switch_event(struct trace_switch_event *switch_event,
1403 1397 u64 timestamp,
1404 1398 struct thread *thread __used)
1405 1399 {
1406   - struct thread *sched_out, *sched_in;
  1400 + struct thread *sched_out __used, *sched_in;
1407 1401 int new_shortname;
1408 1402 u64 timestamp0;
1409 1403 s64 delta;
5 tools/perf/builtin-top.c
@@ -180,7 +180,6 @@ static int parse_source(struct sym_entry *syme)
180 180 FILE *file;
181 181 char command[PATH_MAX*2];
182 182 const char *path;
183   - u64 len;
184 183
185 184 if (!syme)
186 185 return -1;
@@ -209,8 +208,6 @@ static int parse_source(struct sym_entry *syme)
209 208 }
210 209 path = map->dso->long_name;
211 210
212   - len = sym->end - sym->start;
213   -
214 211 sprintf(command,
215 212 "objdump --start-address=%#0*Lx --stop-address=%#0*Lx -dS %s",
216 213 BITS_PER_LONG / 4, map__rip_2objdump(map, sym->start),
@@ -1282,7 +1279,7 @@ static int __cmd_top(void)
1282 1279 {
1283 1280 pthread_t thread;
1284 1281 int i, counter;
1285   - int ret;
  1282 + int i, ret __used;
1286 1283 /*
1287 1284 * FIXME: perf_session__new should allow passing a O_MMAP, so that all this
1288 1285 * mmap reading, etc is encapsulated in it. Use O_WRONLY for now.
2  tools/perf/util/header.c
@@ -1104,7 +1104,7 @@ int event__synthesize_tracing_data(int fd, struct perf_event_attr *pattrs,
1104 1104 {
1105 1105 event_t ev;
1106 1106 ssize_t size = 0, aligned_size = 0, padding;
1107   - int err = 0;
  1107 + int err __used = 0;
1108 1108
1109 1109 memset(&ev, 0, sizeof(ev));
1110 1110
4 tools/perf/util/hist.c
@@ -1009,7 +1009,7 @@ int hist_entry__annotate(struct hist_entry *self, struct list_head *head)
1009 1009 char command[PATH_MAX * 2];
1010 1010 FILE *file;
1011 1011 int err = 0;
1012   - u64 len;
  1012 + char symfs_filename[PATH_MAX];
1013 1013
1014 1014 if (filename == NULL) {
1015 1015 if (dso->has_build_id) {
@@ -1046,8 +1046,6 @@ int hist_entry__annotate(struct hist_entry *self, struct list_head *head)
1046 1046 filename, sym->name, map->unmap_ip(map, sym->start),
1047 1047 map->unmap_ip(map, sym->end));
1048 1048
1049   - len = sym->end - sym->start;
1050   -
1051 1049 pr_debug("annotating [%p] %30s : [%p] %30s\n",
1052 1050 dso, dso->long_name, sym, sym->name);
1053 1051
3  tools/perf/util/scripting-engines/trace-event-python.c
@@ -248,8 +248,7 @@ static void python_process_event(int cpu, void *data,
248 248 context = PyCObject_FromVoidPtr(scripting_context, NULL);
249 249
250 250 PyTuple_SetItem(t, n++, PyString_FromString(handler_name));
251   - PyTuple_SetItem(t, n++,
252   - PyCObject_FromVoidPtr(scripting_context, NULL));
  251 + PyTuple_SetItem(t, n++, context);
253 252
254 253 if (handler) {
255 254 PyTuple_SetItem(t, n++, PyInt_FromLong(cpu));
4 tools/perf/util/symbol.c
@@ -1358,8 +1358,8 @@ int dso__load(struct dso *self, struct map *map, symbol_filter_t filter)
1358 1358 snprintf(name, size, "%s", self->long_name);
1359 1359 break;
1360 1360 case DSO__ORIG_GUEST_KMODULE:
1361   - if (map->groups && map->groups->machine)
1362   - root_dir = map->groups->machine->root_dir;
  1361 + if (map->groups && machine)
  1362 + root_dir = machine->root_dir;
1363 1363 else
1364 1364 root_dir = "";
1365 1365 snprintf(name, size, "%s%s", root_dir, self->long_name);
2  tools/perf/util/trace-event-parse.c
@@ -153,7 +153,7 @@ void parse_proc_kallsyms(char *file, unsigned int size __unused)
153 153 char *next = NULL;
154 154 char *addr_str;
155 155 char ch;
156   - int ret;
  156 + int ret __used;
157 157 int i;
158 158
159 159 line = strtok_r(file, "\n", &next);

0 comments on commit 367cd5e

Please sign in to comment.
Something went wrong with that request. Please try again.