This has nothing to do with the Vertex Cover problem. This is the Strongly Connected Components problem. It has a linear-time solution.
In the (unusual) case of a group of functions that call each other (a strongly connected component bigger than one) but aren't called by anything else, the warning could just report that, listing all the functions in the group.