diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-04-17 10:08:20 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-04-19 12:01:41 -0400 |
commit | 7909675daf55e8222b40e5e162bbc9d633bd5bac (patch) | |
tree | 951e552c458ef8c6b201714fe0b5db2043f3ef61 | |
parent | 4c38c8f5d2c8c48dcf502cd039f30cb1f82fe63c (diff) |
perf tools: Remove FLEX_ARRAY definition
We rely on symbol->name[0] since the beginning of tools/perf/, never
having received any complaint about it, also all the containers build
perf just fine, so remove this git codebase remnant.
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-jsjpgojut8e22o2gtz83augk@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/builtin-help.c | 4 | ||||
-rw-r--r-- | tools/perf/util/util.h | 22 |
2 files changed, 2 insertions, 24 deletions
diff --git a/tools/perf/builtin-help.c b/tools/perf/builtin-help.c index 1eec96a0fa67..9730fd409f3b 100644 --- a/tools/perf/builtin-help.c +++ b/tools/perf/builtin-help.c | |||
@@ -15,13 +15,13 @@ | |||
15 | 15 | ||
16 | static struct man_viewer_list { | 16 | static struct man_viewer_list { |
17 | struct man_viewer_list *next; | 17 | struct man_viewer_list *next; |
18 | char name[FLEX_ARRAY]; | 18 | char name[0]; |
19 | } *man_viewer_list; | 19 | } *man_viewer_list; |
20 | 20 | ||
21 | static struct man_viewer_info_list { | 21 | static struct man_viewer_info_list { |
22 | struct man_viewer_info_list *next; | 22 | struct man_viewer_info_list *next; |
23 | const char *info; | 23 | const char *info; |
24 | char name[FLEX_ARRAY]; | 24 | char name[0]; |
25 | } *man_viewer_info_list; | 25 | } *man_viewer_info_list; |
26 | 26 | ||
27 | enum help_format { | 27 | enum help_format { |
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index 7cf5752b38fd..df13658377e4 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h | |||
@@ -1,28 +1,6 @@ | |||
1 | #ifndef GIT_COMPAT_UTIL_H | 1 | #ifndef GIT_COMPAT_UTIL_H |
2 | #define GIT_COMPAT_UTIL_H | 2 | #define GIT_COMPAT_UTIL_H |
3 | 3 | ||
4 | #ifndef FLEX_ARRAY | ||
5 | /* | ||
6 | * See if our compiler is known to support flexible array members. | ||
7 | */ | ||
8 | #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) | ||
9 | # define FLEX_ARRAY /* empty */ | ||
10 | #elif defined(__GNUC__) | ||
11 | # if (__GNUC__ >= 3) | ||
12 | # define FLEX_ARRAY /* empty */ | ||
13 | # else | ||
14 | # define FLEX_ARRAY 0 /* older GNU extension */ | ||
15 | # endif | ||
16 | #endif | ||
17 | |||
18 | /* | ||
19 | * Otherwise, default to safer but a bit wasteful traditional style | ||
20 | */ | ||
21 | #ifndef FLEX_ARRAY | ||
22 | # define FLEX_ARRAY 1 | ||
23 | #endif | ||
24 | #endif | ||
25 | |||
26 | #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) | 4 | #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) |
27 | 5 | ||
28 | #ifdef __GNUC__ | 6 | #ifdef __GNUC__ |