From f93b2b552ce5fe589b450ff74ca1b459cdbc71a8 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 16 Dec 2024 10:47:18 +0100 Subject: pkg/declextract: fix static function handling The check did not actually match any header files. Fix the check. --- pkg/declextract/interface.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg') diff --git a/pkg/declextract/interface.go b/pkg/declextract/interface.go index 7abce44fb..b5c8ea5ac 100644 --- a/pkg/declextract/interface.go +++ b/pkg/declextract/interface.go @@ -53,7 +53,7 @@ func (ctx *context) processFunctions() { ctx.funcs[fn.File+fn.Name] = fn // Strictly speaking there may be several different static functions in different headers, // but we ignore such possibility for now. - if !fn.IsStatic || strings.HasSuffix(fn.File, "*.h") { + if !fn.IsStatic || strings.HasSuffix(fn.File, ".h") { ctx.funcs[fn.Name] = fn } } @@ -77,7 +77,7 @@ func (ctx *context) processFunctions() { func (ctx *context) reachableLOC(name, file string) int { fn := ctx.findFunc(name, file) if fn == nil { - ctx.warn("can't find function %v in called in %v", name, file) + ctx.warn("can't find function %v called in %v", name, file) return 0 } reachable := make(map[*Function]bool) -- cgit mrf-deployment