Skip to content

Commit 53c8036

Browse files
arndbborkmann
authored andcommitted
bpf: btf: avoid -Wreturn-type warning
gcc warns about a noreturn function possibly returning in some configurations: kernel/bpf/btf.c: In function 'env_type_is_resolve_sink': kernel/bpf/btf.c:729:1: error: control reaches end of non-void function [-Werror=return-type] Using BUG() instead of BUG_ON() avoids that warning and otherwise does the exact same thing. Fixes: eb3f595 ("bpf: btf: Validate type reference") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Song Liu <songliubraving@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
1 parent a493f5f commit 53c8036

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/bpf/btf.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ static bool env_type_is_resolve_sink(const struct btf_verifier_env *env,
749749
!btf_type_is_array(next_type) &&
750750
!btf_type_is_struct(next_type);
751751
default:
752-
BUG_ON(1);
752+
BUG();
753753
}
754754
}
755755

0 commit comments

Comments
 (0)