diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 706e7481bdf6..d8c300d9c4a6 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -8486,7 +8486,7 @@ static int kallsyms_cb(unsigned long long sym_addr, char sym_type, struct extern_desc *ext; char *res; - res = strstr(sym_name, ".llvm."); + res = (char *)strstr(sym_name, ".llvm."); if (sym_type == 'd' && res) ext = find_extern_by_name_with_len(obj, sym_name, res - sym_name); else @@ -11822,7 +11822,7 @@ static int avail_kallsyms_cb(unsigned long long sym_addr, char sym_type, */ char sym_trim[256], *psym_trim = sym_trim, *sym_sfx; - if (!(sym_sfx = strstr(sym_name, ".llvm."))) + if (!(sym_sfx = (char *)strstr(sym_name, ".llvm."))) return 0; /* psym_trim vs sym_trim dance is done to avoid pointer vs array @@ -12410,7 +12410,7 @@ static int resolve_full_path(const char *file, char *result, size_t result_sz) if (s[0] == ':') s++; - next_path = strchr(s, ':'); + next_path = (char *)strchr(s, ':'); seg_len = next_path ? next_path - s : strlen(s); if (!seg_len) continue;