linux-sg2042/tools/include/linux
Arnaldo Carvalho de Melo b5bf1733d6 tools include: Add a __fallthrough statement
For cases where implicit fall through case labels are intended,
to let us inform that to gcc >= 7:

    CC       /tmp/build/perf/util/string.o
  util/string.c: In function 'perf_atoll':
  util/string.c:22:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
      if (*p)
         ^
  util/string.c:24:3: note: here
     case '\0':
     ^~~~

So we introduce:

  #define __fallthrough __attribute__ ((fallthrough))

And use it in such cases.

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>
Cc: William Cohen <wcohen@redhat.com>
Link: http://lkml.kernel.org/n/tip-qnpig0xfop4hwv6k4mv1wts5@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-02-08 17:30:58 -03:00
..
atomic.h tools include: Add basic atomic.h implementation from the kernel sources 2015-05-08 16:11:05 -03:00
bitmap.h tools: add more bitmap functions 2016-12-14 16:04:10 -08:00
bitops.h tools lib: Add for_each_clear_bit macro 2016-10-24 11:07:33 -03:00
compiler.h tools include: Add a __fallthrough statement 2017-02-08 17:30:58 -03:00
coresight-pmu.h tools: Copy coresight-pmu.h header file needed by perf tools 2016-08-23 15:37:33 -03:00
err.h tools: Fix shadowed declaration in err.h 2015-09-30 18:34:22 -03:00
export.h tools: Restore export.h 2015-08-25 09:44:22 +02:00
filter.h bpf: add initial suite for selftests 2016-10-18 11:35:55 -04:00
hash.h tools: Copy linux/{hash,poison}.h and check for drift 2016-07-18 18:41:50 -03:00
hashtable.h tools: Copy hashtable.h into tools directory 2016-03-09 10:48:09 +01:00
kernel.h perf tools: Uninline scnprintf() and vscnprint() 2016-07-12 15:20:24 -03:00
list.h tools: Make list.h self-sufficient 2016-01-12 12:42:07 -03:00
log2.h tools: Adopt roundup_pow_of_two 2014-12-17 11:58:15 -03:00
poison.h tools: Copy linux/{hash,poison}.h and check for drift 2016-07-18 18:41:50 -03:00
rbtree.h tools: Move rbtree.h from tools/perf/ 2015-07-05 22:54:01 -03:00
rbtree_augmented.h tools: Copy rbtree_augmented.h from the kernel 2015-07-05 22:59:05 -03:00
string.h tools lib: Reinstate strlcpy() header guard with __UCLIBC__ 2016-08-18 16:19:13 -03:00
stringify.h tools include: Copy linux/stringify.h from the kernel 2016-03-23 15:14:27 -03:00
time64.h tools: Introduce tools/include/linux/time64.h for *SEC_PER_*SEC macros 2016-08-23 15:37:33 -03:00
types.h tools: enable endian checks for all sparse builds 2016-12-16 00:13:39 +02:00