It depends. Most of the time I actually preach on the horors of hell and give a message of salvation being in Jesus Christ. I then give an altar call. This is what I do at most funerals even though I am often tempted to deal with the stupid statements that people make. But salvation of the lost is more important and in funerals you usually only get one shot at those unsaved souls so I try to make the best of it with an evangelistic message.
However, years ago my church administrator was murdered by her husband (who used to be our church van driver but fell back into drugs). At the funeral one of the people the family (not me) chose to give some words of reflection began spouting silly stuff about God being in control and that there was some purpose in this murder and all that stuff. Afterwards, one of the murdered woman's daughters got up to say that she can't believe that a loving God could do such a thing. Others got up later and just expressed the normal condolences to the family.
When it was my time to give the eulogy/message I blasted outright the idea that God would take such a wonderful sister through murder and explained who the real murderer is (John 8:44; 10:10). I began to explain to them about the spiritual warfare in the heavenlies and how this woman was a casualty of this war. I afterwards rebuked some of the Christian cliches often expressed and and spoke about a God of love. Within it I mused on what a wonderful person we lost.
The funeral attendees were very quiet and I thought I was in trouble but I figured since I started I may as well finish. When it was over many of the attendees (including the family members) thanked me profusely for the message. One guy even told me, "As funerals go, this is the best one I have ever been to. Thank you." Even one of the funeral home directors asked me for our church address because he enjoyed that word so much that he wanted to come to a Sunday service.
Basically, in a nutshell, opne must be led by the Spirit of God how one will proceed at a funeral where dumb stuff is being said.