There are ways to optimize Warlock for damage, such as going Warlock 9/ Hellfire Warlock 2/ Legacy Champion 9 to deal 28d6 Eldritch Blasts. That's no better than a single-classed Warlock for half the build and only gets really powerful in high-level play when other characters get 7th-9th level spells. Luckily, Warlocks get UMD and can even take ten on it, so they can at least pretend to be as powerful as a true spellcaster though it can get expensive. I've found that the best use for Warlock is to spam debuffs every round, such as Blinding Eldritch Chain, and focus on boosting your DCs such as with Ability Focus and Fey Power. Glaivelocks are also quite powerful as melee damage dealers, but they don't get the armor proficiencies of other melee classes or the defensive spells of a gish.