samples/bpf: use canonical fallthrough pseudo-keyword in hbm.c
Andrii Nakryiko
maintainerPATCH 1/1 samples/bpf: use canonical fallthrough pseudo-keyword in hbm.c
Rename now unsupported __fallthrough into fallthrough ([0]) in samples/bpf/hbm.c to fix samples/bpf compilation.
--- samples/bpf/hbm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
samples/bpf/hbm.c +1 -1
@@ -498,7 +498,7 @@ int main(int argc, char **argv)"Option -%c requires an argument.\n\n" , optopt);case 'h' : - __fallthrough; + fallthrough;default :Usage ();return 0 ;
Signature · 1 line
2.34.1
Quoted 6 lines · Andrii Nakryiko
Rename now unsupported
__fallthroughinto fallthrough ([0]) insamples/bpf/hbm.cto fixsamples/bpfcompilation.Signed-off-by Andrii Nakryiko <[email protected]>
LGTM. But there is an alternative, see below.
Quoted 9 lines
--- samples/bpf/hbm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)samples/bpf/hbm.c +0
-0
samples/bpf/hbm.c int main(int argc, char **argv) · line 501
Quoted 5 lines
samples/bpf/hbm.c +1
-1@@ -498,7 +498,7 @@ int main(int argc, char **argv)"Option -%c requires an argument.\n\n" , optopt);case 'h' : - __fallthrough; + fallthrough;
We could remove this 'fallthrough' completely since there is no code under case 'h'.
Quoted 3 lines
samples/bpf/hbm.c +0
-0default :Usage ();return 0 ;
Quoted 19 lines · Yonghong Song
Quoted 6 lines · Andrii Nakryiko
Rename now unsupported
__fallthroughinto fallthrough ([0]) insamples/bpf/hbm.cto fixsamples/bpfcompilation.Signed-off-by Andrii Nakryiko <[email protected]>LGTM. But there is an alternative, see below.
Acked-by Yonghong Song <[email protected]>Quoted 4 lines
--- samples/bpf/hbm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 13 lines
samples/bpf/hbm.c int main(int argc, char **argv) · line 501
Quoted 10 lines
samples/bpf/hbm.c +1
-1@@ -498,7 +498,7 @@ int main(int argc, char **argv)"Option -%c requires an argument.\n\n" , optopt);case 'h' : - __fallthrough; + fallthrough;We could remove this 'fallthrough' completely since there is no code under case 'h'.
yep, should have done it from the get go, will send v2
Quoted 4 lines
Quoted 4 lines
samples/bpf/hbm.c +0
-0default :Usage ();return 0 ;