]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Do not put a variable sized type not at the end of a struct
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 14 Feb 2017 13:59:04 +0000 (10:59 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 14 Feb 2017 18:19:19 +0000 (15:19 -0300)
commita1ec922caabcd4e7e12bfe683e127869ea4afbd6
treec5f631e1b4d80e178baca24abf351a956a4d8b0f
parent60477582b0cf7e52f783070a949c1090c1879ed0
perf tools: 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 an existing thread_map
constructor.

With this we avoid this while compiling with clang:

  util/parse-events.c:2024:21: 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;
                                  ^
  1 error generated.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-tqocbplnyyhpst6drgm2u4m3@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/parse-events.c