Re: [PATCH] kbuild: Change fallthrough comments to attributes

From: kbuild test robot
Date: Thu Aug 15 2019 - 17:08:42 EST


Hi Nathan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[cannot apply to v5.3-rc4 next-20190814]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Nathan-Huckleberry/kbuild-Change-fallthrough-comments-to-attributes/20190813-123202
config: x86_64-randconfig-a004-201932 (attached as .config)
compiler: gcc-6 (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

In file included from include/linux/sched/signal.h:6:0,
from fs//notify/fanotify/fanotify.c:11:
include/linux/signal.h: In function 'sigorsets':
include/linux/signal.h:147:1: warning: empty declaration
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~
>> include/linux/signal.h:132:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:147:1: note: in expansion of macro '_SIG_SET_BINOP'
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~
include/linux/signal.h:147:1: warning: empty declaration
include/linux/signal.h:136:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:147:1: note: in expansion of macro '_SIG_SET_BINOP'
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~
include/linux/signal.h: In function 'sigandsets':
include/linux/signal.h:150:1: warning: empty declaration
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~
>> include/linux/signal.h:132:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:150:1: note: in expansion of macro '_SIG_SET_BINOP'
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~
include/linux/signal.h:150:1: warning: empty declaration
include/linux/signal.h:136:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:150:1: note: in expansion of macro '_SIG_SET_BINOP'
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~
include/linux/signal.h: In function 'sigandnsets':
include/linux/signal.h:153:1: warning: empty declaration
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~
>> include/linux/signal.h:132:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:153:1: note: in expansion of macro '_SIG_SET_BINOP'
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~
include/linux/signal.h:153:1: warning: empty declaration
include/linux/signal.h:136:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:153:1: note: in expansion of macro '_SIG_SET_BINOP'
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~
include/linux/signal.h: In function 'signotset':
include/linux/signal.h:177:1: warning: empty declaration
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~
include/linux/signal.h:166:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:177:1: note: in expansion of macro '_SIG_SET_OP'
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~
include/linux/signal.h:177:1: warning: empty declaration
include/linux/signal.h:168:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:177:1: note: in expansion of macro '_SIG_SET_OP'
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~
include/linux/signal.h: In function 'sigemptyset':
include/linux/signal.h:189:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/signal.h:189:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/signal.h: In function 'sigfillset':
include/linux/signal.h:202:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/signal.h:202:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/signal.h: In function 'siginitset':
include/linux/signal.h:233:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/signal.h:233:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/signal.h: In function 'siginitsetinv':
include/linux/signal.h:246:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/signal.h:246:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
In file included from include/linux/pid_namespace.h:7:0,
from include/linux/ptrace.h:10,
from include/linux/audit.h:13,
from fs//notify/fanotify/fanotify.c:14:
include/linux/mm.h: In function '__mm_zero_struct_page':
include/linux/mm.h:162:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
>> include/linux/mm.h:162:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/mm.h:165:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/mm.h:165:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/mm.h:168:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/mm.h:168:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
--
In file included from include/linux/security.h:32:0,
from fs//notify/fanotify/fanotify_user.c:12:
include/linux/mm.h: In function '__mm_zero_struct_page':
include/linux/mm.h:162:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
>> include/linux/mm.h:162:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/mm.h:165:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/mm.h:165:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/mm.h:168:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/mm.h:168:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
In file included from include/linux/syscalls.h:76:0,
from fs//notify/fanotify/fanotify_user.c:13:
include/linux/signal.h: In function 'sigorsets':
include/linux/signal.h:147:1: warning: empty declaration
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~
>> include/linux/signal.h:132:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:147:1: note: in expansion of macro '_SIG_SET_BINOP'
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~
include/linux/signal.h:147:1: warning: empty declaration
include/linux/signal.h:136:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:147:1: note: in expansion of macro '_SIG_SET_BINOP'
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~
include/linux/signal.h: In function 'sigandsets':
include/linux/signal.h:150:1: warning: empty declaration
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~
>> include/linux/signal.h:132:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:150:1: note: in expansion of macro '_SIG_SET_BINOP'
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~
include/linux/signal.h:150:1: warning: empty declaration
include/linux/signal.h:136:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:150:1: note: in expansion of macro '_SIG_SET_BINOP'
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~
include/linux/signal.h: In function 'sigandnsets':
include/linux/signal.h:153:1: warning: empty declaration
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~
>> include/linux/signal.h:132:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:153:1: note: in expansion of macro '_SIG_SET_BINOP'
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~
include/linux/signal.h:153:1: warning: empty declaration
include/linux/signal.h:136:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:153:1: note: in expansion of macro '_SIG_SET_BINOP'
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~
include/linux/signal.h: In function 'signotset':
include/linux/signal.h:177:1: warning: empty declaration
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~
include/linux/signal.h:166:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:177:1: note: in expansion of macro '_SIG_SET_OP'
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~
include/linux/signal.h:177:1: warning: empty declaration
include/linux/signal.h:168:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:177:1: note: in expansion of macro '_SIG_SET_OP'
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~
include/linux/signal.h: In function 'sigemptyset':
include/linux/signal.h:189:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/signal.h:189:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/signal.h: In function 'sigfillset':
include/linux/signal.h:202:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/signal.h:202:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/signal.h: In function 'siginitset':
include/linux/signal.h:233:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/signal.h:233:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/signal.h: In function 'siginitsetinv':
include/linux/signal.h:246:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/signal.h:246:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
--
In file included from fs//xfs/kmem.h:11:0,
from fs//xfs/xfs_linux.h:24,
from fs//xfs/xfs.h:22,
from fs//xfs/xfs_trace.c:6:
include/linux/mm.h: In function '__mm_zero_struct_page':
include/linux/mm.h:162:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
>> include/linux/mm.h:162:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/mm.h:165:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/mm.h:165:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/mm.h:168:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/mm.h:168:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
In file included from include/linux/sched/signal.h:6:0,
from fs//xfs/xfs_linux.h:39,
from fs//xfs/xfs.h:22,
from fs//xfs/xfs_trace.c:6:
include/linux/signal.h: In function 'sigorsets':
include/linux/signal.h:147:1: warning: empty declaration
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~
>> include/linux/signal.h:132:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:147:1: note: in expansion of macro '_SIG_SET_BINOP'
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~
include/linux/signal.h:147:1: warning: empty declaration
include/linux/signal.h:136:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:147:1: note: in expansion of macro '_SIG_SET_BINOP'
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~
include/linux/signal.h: In function 'sigandsets':
include/linux/signal.h:150:1: warning: empty declaration
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~
>> include/linux/signal.h:132:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:150:1: note: in expansion of macro '_SIG_SET_BINOP'
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~
include/linux/signal.h:150:1: warning: empty declaration
include/linux/signal.h:136:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:150:1: note: in expansion of macro '_SIG_SET_BINOP'
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~
include/linux/signal.h: In function 'sigandnsets':
include/linux/signal.h:153:1: warning: empty declaration
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~
>> include/linux/signal.h:132:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:153:1: note: in expansion of macro '_SIG_SET_BINOP'
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~
include/linux/signal.h:153:1: warning: empty declaration
include/linux/signal.h:136:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:153:1: note: in expansion of macro '_SIG_SET_BINOP'
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~
include/linux/signal.h: In function 'signotset':
include/linux/signal.h:177:1: warning: empty declaration
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~
include/linux/signal.h:166:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:177:1: note: in expansion of macro '_SIG_SET_OP'
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~
include/linux/signal.h:177:1: warning: empty declaration
include/linux/signal.h:168:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
__attribute__((fallthrough)); \
^
include/linux/signal.h:177:1: note: in expansion of macro '_SIG_SET_OP'
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~
include/linux/signal.h: In function 'sigemptyset':
include/linux/signal.h:189:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/signal.h:189:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/signal.h: In function 'sigfillset':
include/linux/signal.h:202:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/signal.h:202:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/signal.h: In function 'siginitset':
include/linux/signal.h:233:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/signal.h:233:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/signal.h: In function 'siginitsetinv':
include/linux/signal.h:246:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/signal.h:246:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
In file included from include/linux/rhashtable.h:23:0,
from fs//xfs/xfs_linux.h:62,
from fs//xfs/xfs.h:22,
from fs//xfs/xfs_trace.c:6:
include/linux/jhash.h: In function 'jhash':
>> include/linux/jhash.h:91:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
>> include/linux/jhash.h:91:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/jhash.h:94:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/jhash.h:94:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/jhash.h:97:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/jhash.h:97:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/jhash.h:100:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/jhash.h:100:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/jhash.h:103:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/jhash.h:103:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/jhash.h:106:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/jhash.h:106:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/jhash.h:109:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/jhash.h:109:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/jhash.h:112:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/jhash.h:112:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/jhash.h:115:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/jhash.h:115:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/jhash.h:118:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/jhash.h:118:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/jhash.h:121:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/jhash.h:121:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/jhash.h: In function 'jhash2':
include/linux/jhash.h:161:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/jhash.h:161:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/jhash.h:164:3: warning: empty declaration
__attribute__((fallthrough));
^~~~~~~~~~~~~
include/linux/jhash.h:164:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
..

vim +132 include/linux/signal.h

120
121 #define _SIG_SET_BINOP(name, op) \
122 static inline void name(sigset_t *r, const sigset_t *a, const sigset_t *b) \
123 { \
124 unsigned long a0, a1, a2, a3, b0, b1, b2, b3; \
125 \
126 switch (_NSIG_WORDS) { \
127 case 4: \
128 a3 = a->sig[3]; a2 = a->sig[2]; \
129 b3 = b->sig[3]; b2 = b->sig[2]; \
130 r->sig[3] = op(a3, b3); \
131 r->sig[2] = op(a2, b2); \
> 132 __attribute__((fallthrough)); \
133 case 2: \
134 a1 = a->sig[1]; b1 = b->sig[1]; \
135 r->sig[1] = op(a1, b1); \
136 __attribute__((fallthrough)); \
137 case 1: \
138 a0 = a->sig[0]; b0 = b->sig[0]; \
139 r->sig[0] = op(a0, b0); \
140 break; \
141 default: \
142 BUILD_BUG(); \
143 } \
144 }
145
146 #define _sig_or(x,y) ((x) | (y))
> 147 _SIG_SET_BINOP(sigorsets, _sig_or)
148

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip