How to avoid compilation of an uncalled function

I have a similar problem, but in a @generated function. I haven’t, as yet, been able to fix it.