diff options
| author | Arnaldo Carvalho de Melo <[email protected]> | 2017-02-14 13:59:04 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2017-02-14 18:56:54 +0000 |
| commit | c24ae6d96112b10ef703a58d7d74583716d2ce69 (patch) | |
| tree | cb96268f56ef91a5616ddfe70cda1da998cfac11 /tools/perf/util/scripting-engines/trace-event-python.c | |
| parent | perf probe: Avoid accessing uninitialized 'map' variable (diff) | |
| download | kernel-c24ae6d96112b10ef703a58d7d74583716d2ce69.tar.gz kernel-c24ae6d96112b10ef703a58d7d74583716d2ce69.zip | |
perf evsel: Do not put a variable sized type not at the end of a struct
As this is a GNU extension and while harmless in this case, we can do
the same thing in a more clearer way by using a existing thread_map and
cpu_map constructors:
With this we avoid this while compiling with clang:
util/evsel.c:1659:17: error: field 'map' with variable sized type 'struct cpu_map' not at the end of a struct or class is a GNU extension
[-Werror,-Wgnu-variable-sized-type-not-at-end]
struct cpu_map map;
^
util/evsel.c:1667:20: error: field 'map' with variable sized type 'struct thread_map' not at the end of a struct or class is a GNU extension
[-Werror,-Wgnu-variable-sized-type-not-at-end]
struct thread_map map;
^
Cc: Adrian Hunter <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Wang Nan <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions
