]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
perf tools: Remove FLEX_ARRAY definition
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 17 Apr 2017 14:08:20 +0000 (11:08 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 19 Apr 2017 16:01:41 +0000 (13:01 -0300)
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>
tools/perf/builtin-help.c
tools/perf/util/util.h

index 1eec96a0fa675350fed9e55e1bbef85bfd266171..9730fd409f3b7825f6ff73c3cb9136f63fcc6943 100644 (file)
 
 static struct man_viewer_list {
        struct man_viewer_list *next;
-       char name[FLEX_ARRAY];
+       char name[0];
 } *man_viewer_list;
 
 static struct man_viewer_info_list {
        struct man_viewer_info_list *next;
        const char *info;
-       char name[FLEX_ARRAY];
+       char name[0];
 } *man_viewer_info_list;
 
 enum help_format {
index 7cf5752b38fdbbdf380ba2e4dd9403bfd0f81ea9..df13658377e45d989bfa7789ee0dd1269c2a546e 100644 (file)
@@ -1,28 +1,6 @@
 #ifndef GIT_COMPAT_UTIL_H
 #define GIT_COMPAT_UTIL_H
 
-#ifndef FLEX_ARRAY
-/*
- * See if our compiler is known to support flexible array members.
- */
-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
-# define FLEX_ARRAY /* empty */
-#elif defined(__GNUC__)
-# if (__GNUC__ >= 3)
-#  define FLEX_ARRAY /* empty */
-# else
-#  define FLEX_ARRAY 0 /* older GNU extension */
-# endif
-#endif
-
-/*
- * Otherwise, default to safer but a bit wasteful traditional style
- */
-#ifndef FLEX_ARRAY
-# define FLEX_ARRAY 1
-#endif
-#endif
-
 #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
 
 #ifdef __GNUC__